Files
sdk/pkg/analysis_server/benchmark
Alexander Markov 136aee0655 [analysis_server] Fix flaky hanging in analysis server benchmark
This hanging was exposed when running analysis server benchmark on the VM
with bytecode due to different timings.

Benchmark was sending a request to analysis server and then subscribing to
a broadcast stream, which was populated from the output of analysis server
process.

Before the fix it was possible that benchmark wouldn't see
CompletionResultsParams which was posted to test.onCompletionResults
between sending a request and subscribing to test.onCompletionResults.
As a result, benchmark was waiting on a Future for a skipped
CompletionResultsParams indefinitely.

Change-Id: I6f282b504437d687ccac3e96fada201bf25dbd10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111484
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-08-01 16:30:13 +00:00
..

Analysis Server Benchmarks

How to run the benchmarks

To see a list of all available benchmarks, run:

dart benchmark/benchmarks.dart list

To run an individual benchmark, run:

dart benchmark/benchmarks.dart run <benchmark-id>

How they're tested

In order to make sure that our benchmarks don't regress in terms of their ability to run, we create one unit test per benchmark, and run those tests as part of our normal CI test suite.

To save time on the CI, we only run one iteration of each benchmark (--repeat=1), and we run the benchmark on a smaller data set (--quick).

See test/benchmark_test.dart.

To add a new benchmark

Register the new benchmark in the main() method of benchmark/benchmarks.dart.

On the bots

Our benchmarks run on a continuous performance testing system. Currently, the benchmarks need to be manually registered ahead of time.