-
Notifications
You must be signed in to change notification settings - Fork 197
Merge protobuf_benchmarks and query_benchmark #698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
sigurdm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
👍 Would be good numbers stay compatible so we keep old history. |
|
Another thing you may want to consider: Check the |
|
I'm updating Golem to use benchmarks added in this PR. Once that works I'll merge this PR. |
sortie
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple thoughts :)
| /// | ||
| /// Overrides the relevant [bh.BenchmarkBase] method(s) to report accurate | ||
| /// results, rather than 10x the actual results. | ||
| abstract class BenchmarkBase extends bh.BenchmarkBase { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider another name for this class to avoid confusion between the upstream BenchmarkBase and this modified one.
I am planning on fixing the 10x bug in BenchmarkBase once I have time to think up a migration scheme
What benchmark_harness calls RunTime is called RunTimeRaw in Golem. Do the translation.
This merges two benchmark packages into one to make it easier to run benchmarks
on Golem and locally.
api_benchmarkis not merged: it runs a web server and benchmarks performancein an actual browser. We should revisit those benchmarks to see if they make
sense and see if it's a good idea to merge them into the new benchmark package
in this PR.
Changes:
Remove
protobuf_benchmarks,query_benchmark. Move benchmarks in both tobenchmarks.Use
benchmark_harnessin all benchmarks. Previously onlyprotobuf_benchmarksusedbenchmark_harness.Because
benchmark_harnessreports 10x the actual number(Why is the benchmark reporting 10-times higher values? dart-lang/tools#791), to be compatible
with the old
query_benchmarkresults (which are stored in Golem) andgenerally report accurate results,
BenchmarkBaseclass overrides therelevant method(s) from
benchmark_harness.BenchmarkBaseto divide theresult by 10 before reporting.
Outputs before:
Outputs after:
All benchmarks (query_benchmark and others) use this new class.
Directory structure:
datasets/has benchmark inputs (i.e. binary encoded protos)protos/has benchmark protoslib/has code common to all benchmarks (file operations, benchmark class)tool/compile_protos.shcompiles all protostool/run_protoc_plugin.shruns protoc plugin from../protoc_plugin.Used by
compile_protos.sh.tool/compile_benchmarks.dartcompiles benchmark programs to native andJS, in parallel
bin/contains benchmarksprotoc_versionis used by Golem to download the right version of protocEach benchmark now has its own executable. This is to allow benchmarking
changes in isolation. For example, to avoid changing encoding benchmark
results when decoding code was modified, because of global analyses or JIT.
protobuf_benchmarks/inputs no longer usebenchmarks.proto. Insteadthe input files are now the
payloadfields ofBenchmarkDatasets, andinput file name specifies message type.
Fixes #613
Golem cl 4855277
cc @mkustermann