Save results of A/B test runs in a JSON file for future processing (#56416)

This commit is contained in:
Jim Graham
2020-05-08 00:34:02 -07:00
committed by GitHub
parent da66a45e87
commit 3519bec6c4
5 changed files with 300 additions and 9 deletions

View File

@@ -167,8 +167,10 @@ An example of a local engine architecture is `android_debug_unopt_x86`.
You can run an A/B test that compares the performance of the default engine
against a local engine build. The test runs the same benchmark a specified
number of times against both engines, then outputs a tab-separated spreadsheet
with the results. The results can be copied to a Google Spreadsheet for further
inspection.
with the results and stores them in a JSON file for future reference. The
results can be copied to a Google Spreadsheet for further inspection and the
JSON file can be reprocessed with the summarize.dart command for more detailed
output.
Example:
@@ -183,6 +185,11 @@ The `--ab=10` tells the runner to run an A/B test 10 times.
`--local-engine=host_debug_unopt` tells the A/B test to use the `host_debug_unopt`
engine build. `--local-engine` is required for A/B test.
`--ab-result-file=filename` can be used to provide an alternate location to output
the JSON results file (defaults to `ABresults#.json`). A single `#` character can be
used to indicate where to insert a serial number if a file with that name already
exists, otherwise the file will be overwritten.
A/B can run exactly one task. Multiple tasks are not supported.
Example output:
@@ -203,6 +210,21 @@ the default engine. Values less than 1.0 indicate a slow-down. For example,
0.5x means the local engine is twice as slow as the default engine, and 2.0x
means it's twice as fast. Higher is better.
Summarize tool example:
```sh
../../bin/cache/dart-sdk/bin/dart bin/summarize.dart --[no-]tsv-table --[no-]raw-summary \
ABresults.json ABresults1.json ABresults2.json ...
```
`--[no-]tsv-table` tells the tool to print the summary in a table with tabs for easy spreadsheet
entry. (defaults to on)
`--[no-]raw-summary` tells the tool to print all per-run data collected by the A/B test formatted
with tabs for easy spreadsheet entry. (defaults to on)
Multiple trailing filenames can be specified and each such results file will be processed in turn.
# Reproducing broken builds locally
To reproduce the breakage locally `git checkout` the corresponding Flutter