-
Notifications
You must be signed in to change notification settings - Fork 24
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
Update Benchmark set up and persist benchmarks #180
base: main
Are you sure you want to change the base?
Conversation
We have recently updated our toolchain version to 5.9, but have never updated the benchmark suite to use 5.9 or newer. Also, it does not look like we ever commited a baseline to this repository. While at it, wiring up GitHub actions to run the benchmarks for every pull request, as well as on a merge into `main`. Re-uses a lot of the heavy lifting that was defined in `apple/swift-nio` already. Note that `nightly-main` appears broken at the moment. The Benchmark tool gets stuck, and initial debugging point to it never finishing `_sendAndAcknowledgeMessages` when producing a set of messages before every benchmark.
Right. So the benchmark performs worse on GitHub Actions than on my local machine. What's the blessed approach of introducing a baseline then? |
Extract the values from GH actions and use those as the baseline, sadly. |
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.
Overall this looks really good, it'll be great to have the benchmarks up and running in CI. Just some small comments.
Unfortunately as Cory pointed out we don't have a great story for updating the thresholds right now but it's something I'm hoping to improve.
Removing the workaround comment
{ | ||
"allocatedResidentMemory" : 77266944, | ||
"cpuTotal" : 200000000, | ||
"objectAllocCount" : 5549, | ||
"releaseCount" : 15168, | ||
"retainCount" : 7108, | ||
"retainReleaseDelta" : 2511, | ||
"throughput" : 2, | ||
"wallClock" : 695307500 | ||
} |
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.
In most of our repositories we only add benchmarks for mallocCountTotal
because it is a stable measure. We don't yet have dedicated runners which would be required for time-based benchmarks
Changes the benchmark to iterate over the consume loop a total of 1000 times. We now produce 1000*1000 (1e6) messages into the topic, and on every benchmark iteration consume 1000 messages each. I had to comment the `librdkafka_with_offset_commit_messages_*` benchmark. For some reason, the benchmark suite keeps re-running it, and I have seen occasional failures when attempting to commit offsets. It's unclear to me why that happens right now, but decided it's not worth the investigation at the moment.
`swift build` was happy for whatever reason beofre.
Keeps `scalingFactor: .kilo`, but only measures `.mallocCountTotal`, as that should be a reproducible value across different systems.
We have recently updated our toolchain version to 5.9, but have never updated the benchmark suite to use 5.9 or newer. Also, it does not look like we ever commited a baseline to this repository.
While at it, wiring up GitHub actions to run the benchmarks for every pull request, as well as on a merge into
main
. Re-uses a lot of the heavy lifting that was defined inapple/swift-nio
already.Note that
nightly-main
appears broken at the moment. The Benchmark tool gets stuck, and initial debugging point to it never finishing_sendAndAcknowledgeMessages
when producing a set of messages before every benchmark.