Update Benchmark set up and persist benchmarks#180
Open
mimischi wants to merge 7 commits into
Open
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.
Member
Author
|
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. |
rnro
reviewed
Nov 25, 2024
rnro
left a comment
Contributor
There was a problem hiding this comment.
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
rnro
reviewed
Nov 25, 2024
Comment on lines
+1
to
+10
| { | ||
| "allocatedResidentMemory" : 77266944, | ||
| "cpuTotal" : 200000000, | ||
| "objectAllocCount" : 5549, | ||
| "releaseCount" : 15168, | ||
| "retainCount" : 7108, | ||
| "retainReleaseDelta" : 2511, | ||
| "throughput" : 2, | ||
| "wallClock" : 695307500 | ||
| } No newline at end of file |
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-nioalready.Note that
nightly-mainappears broken at the moment. The Benchmark tool gets stuck, and initial debugging point to it never finishing_sendAndAcknowledgeMessageswhen producing a set of messages before every benchmark.