diff --git a/packages/gauge/CHANGELOG.md b/packages/gauge/CHANGELOG.md index b772b23ea9..060aefee65 100644 --- a/packages/gauge/CHANGELOG.md +++ b/packages/gauge/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.5 + +* Print more logs for debugging. + ## 0.1.4 * Download depot_tools automatically. diff --git a/packages/gauge/README.md b/packages/gauge/README.md index 5d266e5d1a..d4fad09463 100644 --- a/packages/gauge/README.md +++ b/packages/gauge/README.md @@ -6,7 +6,7 @@ compatible. # Install -First install Xcode 10 (https://developer.apple.com/download/more/), +First install Xcode 10.3 (https://developer.apple.com/download/more/), [dart](https://dart.dev/get-dart), and [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git). Make sure that `pub`, `git`, and `instruments` are on your path. diff --git a/packages/gauge/lib/parser.dart b/packages/gauge/lib/parser.dart index a13e7a74c9..c1b168799f 100644 --- a/packages/gauge/lib/parser.dart +++ b/packages/gauge/lib/parser.dart @@ -31,6 +31,7 @@ class IosTraceParser { final bool isVerbose; final String traceUtilityPath; + List _lines; List _gpuMeasurements; List _cpuMeasurements; @@ -44,13 +45,13 @@ class IosTraceParser { print('TraceUtility stderr:\n${result.stderr.toString}\n\n'); throw Exception('TraceUtility failed with exit code ${result.exitCode}'); } - final List lines = result.stderr.toString().split('\n'); + _lines = result.stderr.toString().split('\n'); // toSet to remove duplicates _gpuMeasurements = - lines.where((String s) => s.contains('GPU')).toSet().toList(); + _lines.where((String s) => s.contains('GPU')).toSet().toList(); _cpuMeasurements = - lines.where((String s) => s.contains(processName)).toSet().toList(); + _lines.where((String s) => s.contains(processName)).toSet().toList(); _gpuMeasurements.sort(); _cpuMeasurements.sort(); @@ -107,8 +108,9 @@ class IosTraceParser { double _average(Iterable values) { if (values == null || values.isEmpty) { - _gpuMeasurements.forEach(print); - _cpuMeasurements.forEach(print); + print('TraceUtility output:\n${_lines.join('\n')}\n\n'); + print('GPU measurements:\n${_gpuMeasurements.join('\n')}\n\n'); + print('CPU measurements:\n${_cpuMeasurements.join('\n')}\n\n'); throw Exception('No valid measurements found.'); } return values.reduce((double a, double b) => a + b) / values.length; diff --git a/packages/gauge/pubspec.yaml b/packages/gauge/pubspec.yaml index 2d2e35bf3e..9b7cf9a8cf 100644 --- a/packages/gauge/pubspec.yaml +++ b/packages/gauge/pubspec.yaml @@ -4,9 +4,8 @@ description: Currently there's only one tool to measure iOS CPU/GPU usages for Flutter's CI tests. -author: Flutter Team homepage: https://github.com/flutter/packages/tree/master/packages/gauge -version: 0.1.4 +version: 0.1.5 executables: gauge: gauge