-
Notifications
You must be signed in to change notification settings - Fork 205
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
sandbox-perf: Fix broken benchmarks and make sure they stay fixed. #4265
Conversation
The `sandbox-perf` build has been failing for a while with the following errors: ``` INFO: From Generating benchmark code for //ledger/sandbox-perf:sandbox-perf_codegen: JMH benchmark generation: JMH Benchmark generator failed JMH benchmark generation: Benchmark classes should not be final. [com.digitalasset.platform.sandbox.perf.LargeTransactionBench] JMH benchmark generation: The instantiated @State class cannot be abstract. [com.digitalasset.platform.sandbox.perf.PerfBenchState] ``` However, these errors are ignored; running the benchmarks runs the `AcsBench` benchmark and ignores the fact `LargeTransactionBench` and `SimpleBench` failed to compile. I've fixed the errors by making sure that classes are not final, and that `SimpleBench` uses a concrete state class. This also introduces a cheap patch to the Scala JMH Bazel rules that makes sure they fail if there are any errors. I'm not really sure how to patch the Bazel rules properly, but someone else might have an idea. :-) CHANGELOG_BEGIN CHANGELOG_END
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, thanks!
@@ -0,0 +1,46 @@ | |||
diff --git a/src/scala/io/bazel/rules_scala/jmh_support/BenchmarkGenerator.scala b/src/scala/io/bazel/rules_scala/jmh_support/BenchmarkGenerator.scala |
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.
That looks good to me, would be great to upstream to https://github.com/bazelbuild/rules_scala
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.
Will do!
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.
Opened: bazelbuild/rules_scala#977
FYI @aherrmann-da: this has now been patched upstream in bazelbuild/rules_scala#977, so when we upgrade Bazel to v2.0, we can potentially upgrade |
@SamirTalwar-DA Awesome, thanks for upstreaming this! |
The
sandbox-perf
build has been failing for a while with the followingerrors:
However, these errors are ignored; running the benchmarks runs the
AcsBench
benchmark and ignores the factLargeTransactionBench
andSimpleBench
failed to compile.I've fixed the errors by making sure that classes are not final, and
that
SimpleBench
uses a concrete state class.This also introduces a cheap patch to the Scala JMH Bazel rules that
makes sure they fail if there are any errors.
I'm not really sure how to patch the Bazel rules properly, but someone
else might have an idea. :-)
Closes #4229.
Pull Request Checklist
CHANGELOG_BEGIN
andCHANGELOG_END
tagsNOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with
/AzurePipelines run
totrigger the build.