-
Notifications
You must be signed in to change notification settings - Fork 644
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
Fix NIOAsyncChannel
allocation benchmarks
#2622
Fix NIOAsyncChannel
allocation benchmarks
#2622
Conversation
try await self._storage.yield(contentsOf: CollectionOfOne(element)) | ||
try await self._storage.yield(element: element) |
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.
The fix here is quite simple. The problem was that we lost the fast path for single element writes in some refactoring. This PR duplicates the write path and specialises one of them for single element writes to call the optimised delegate method of the writer.
1abaab4
to
5ff86ef
Compare
configuration: .init( | ||
metrics: defaultMetrics, | ||
timeUnits: .milliseconds, | ||
scalingFactor: .mega, |
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.
If you update to Benchmark 1.22.0
you can now add some slack to the p90 check for malloc counts, this should do the trick (allowing for a +-100 mallocs);
scalingFactor: .mega, | |
scalingFactor: .mega, | |
thresholds: [.mallocCountTotal : .init(absolute: [.p90 : 100])], |
3312324
to
ad67033
Compare
ad67033
to
9775ef7
Compare
# Motivation We had to disable the benchmarks since they regressed without us noticing and they appear to be flaky. # Modification This PR fixes the allocation regression and tries to re-enable them.
9775ef7
to
02efe9d
Compare
Motivation
We had to disable the benchmarks since they regressed without us noticing and they appear to be flaky.
Modification
This PR fixes the allocation regression and tries to re-enable them.