make microbenchmark logging verbose (#12858)

* make microbenchmark logging verbose

* prefix JSON so it can be parsed in verbose mode
This commit is contained in:
Yegor
2017-11-02 18:11:34 -07:00
committed by GitHub
parent 616a2ad6da
commit 35bb855c0d
2 changed files with 11 additions and 7 deletions

View File

@@ -39,9 +39,13 @@ class BenchmarkResultPrinter {
/// for computer consumption and once formatted as plain text for humans.
void printToStdout() {
// IMPORTANT: keep these values in sync with dev/devicelab/bin/tasks/microbenchmarks.dart
print('================ RESULTS ================');
print(_printJson());
print('================ FORMATTED ==============');
const String jsonStart = '================ RESULTS ================';
const String jsonEnd = '================ FORMATTED ==============';
const String jsonPrefix = ':::JSON:::';
print(jsonStart);
print('$jsonPrefix ${_printJson()}');
print(jsonEnd);
print(_printPlainText());
}