-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Add benchmarks #103
Add benchmarks #103
Conversation
IMO we should use static thresholds, like SwiftNIO does. package-benchmark relatively recently added a I think using something like this should work to compare static thresholds against current branch: swift package -c release --disable-sandbox \
benchmark thresholds check \
--path $PWD/Benchmarks/Thresholds/ \
--format markdown |
The problem with this is we don't have any baseline thresholds (yet) |
<See the new comment below> |
/// the base sequence when an iterator is created. So you can only iterate once. | ||
/// | ||
/// Not safe. Only for testing purposes. | ||
/// Use `swift-algorithms`'s `AsyncSyncSequence`` instead if you're looking for something like this. |
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.
Why are we not?
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.
It does not release the reference when an iterator is created, so it triggers CoW.
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.
I mean i know why it doesn't, and it shouldn't, but that's not what we need. We want the benchmarks to be self-contained and only have minimum required overhead. If someone is using some kind of sequence with Multipart-Kit that is inefficient, then that's not our fault.
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.
Not right now but I'm surprised there aren't existing actions for commenting on issues and we should look at turning this into its own action (or submitting it to the swift lang repo)
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.
Actually there are and we were using it but someone decided to do it by hand 😆 vapor/jwt-kit#222 (comment)
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 github-scripts doesn't really help, we'll end up with around the same amount of lines of code, just in js instead of bash.
Most of the code here is to keep track of the old comment and don't create new comments.
I think Tim is talking about a dedicated action that takes some parameters and just does the work. Something like actions/checkout@v4
but for this purpose.
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.
Yeah we had that before, that's what I meant with my comment in JWTKit https://github.com/thollander/actions-comment-pull-request but not sure if this can update comments too rather than creating new ones
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.
it appears it can update comments too? I'd use it if it can.
In the original CI i wrote this CI file for, i can't do that since the comment keeps some more state with it as well, but here i should be able to.
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.
Nice https://github.com/thollander/actions-comment-pull-request seems to be working well.
It apparently works the same way my curl stuff were working, but it clears 80 lines out of the CI file so better to use this instead.
Benchmark Report✅ Pull request has no significant performance differences ✅ Click to expand comparison resultBenchmark check running at 2025-01-14 16:00:22 UTCThe baseline benchmarks is EQUAL to the defined thresholds. Click to expand benchmark resultBaseline benchmarks
ParserCollatingParserAllocations_256MiB
CollatingParserAllocations_Empty
CollatingParserCPUTime_256MiB
StreamingParserAllocations_256MiB
StreamingParserAllocations_Empty
StreamingParserCPUTime_256MiB
Serializer100xSerializerCPUTime_1024Parts
SerializerAllocations_1024Parts
SerializerAllocations_Empty
|
No description provided.