-
Notifications
You must be signed in to change notification settings - Fork 4.5k
JMH benchmarks on reading field values from RowWithGetters. #17203
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
Codecov Report
@@ Coverage Diff @@
## master #17203 +/- ##
==========================================
- Coverage 73.96% 73.96% -0.01%
==========================================
Files 672 672
Lines 88259 88269 +10
==========================================
+ Hits 65283 65284 +1
- Misses 21863 21872 +9
Partials 1113 1113
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
|
It could make sense to run these benchmarks continuously and upload metrics to s.apache.org/beam-community-metrics |
|
CC @apilloud |
|
It would be great if we could do t
It would be great if we did this for all JMH benchmarks. |
| import static org.apache.beam.repackaged.core.org.apache.commons.lang3.RandomStringUtils.random; | ||
| import static org.apache.beam.sdk.values.RowWithGettersBenchmark.MapOfPrimitiveBundle.primitiveMapPojo; | ||
| import static org.apache.beam.sdk.values.RowWithGettersBenchmark.SimplePojoBundle.simplePojo; | ||
|
|
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.
Please create a separate JMH subproject that is under sdks/java/core/jmh
|
Ok, I'll have a look at that @TheNeuralBit and @lukecwik 👍 Could you point me to any existing build task that would do something similar? |
|
See https://github.com/apache/beam/blob/master/sdks/java/harness/jmh/build.gradle Key part is |
|
Closing this, follow up is here #22182 |
(PR just for reference, not meant to be merged)
JMH benchmarks on reading field values from
RowWithGetters. This is meant to establish a baseline for the current code on master.Here's a visualization of the results for master comparing two benchmark runs reading field values once & three times with
NOTE:
Each benchmark method invocation processes a bundle of 50k rows and
recursively reads all values per row. The rows are created upfront using JMH
Statetoexclude any initialization costs from the measurement. To prevent unintended cache hits in
RowWithGettersa new bundle of rows must be generated before every invocation.Using state setup per
Level#Invocationhas significant drawbacks by itself! Though,given that reading bundles of 50k rows takes well above 1 ms, each
individual invocation can be adequately timestamped without risking generating wrong results.
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
R: @username).[BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replaceBEAM-XXXwith the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.CHANGES.mdwith noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI.