Logging instructions and allocations benchmarks#386
Merged
kukushechkin merged 42 commits intoapple:mainfrom Nov 24, 2025
Merged
Logging instructions and allocations benchmarks#386kukushechkin merged 42 commits intoapple:mainfrom
kukushechkin merged 42 commits intoapple:mainfrom
Conversation
80a8492 to
23827f4
Compare
8811d1f to
62cf62d
Compare
62cf62d to
980d14a
Compare
rnro
reviewed
Nov 21, 2025
Contributor
rnro
left a comment
There was a problem hiding this comment.
The implementation of this looks good but my main thought is - woah that's a lot of files. I suspect this would be painful to maintain. Do you actually want to explore the full parameter space? It seems you'd get most of the value from for example:
- Each log level when enabled
- Each log level when disabled (or even a log level when disabled)
Contributor
Author
|
Yeah, I've been thinking about this as well. It is not painful, as they are all the same, but added value in having all of them is basically none. Yeah, let's go with 4 cases to keep the implementation, just a permutation of |
czechboy0
reviewed
Nov 21, 2025
FranzBusch
approved these changes
Nov 21, 2025
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.
Add simple benchmarks measuring instructions count and allocations when logging with various log levels.
Motivation:
Establish the baseline and have automated checks before approaching performance improvements.
Modifications:
Benchmarkssub-package is addedResult:
An example of a benchmark failing with a better results than expected: https://github.com/apple/swift-log/actions/runs/19540944353/job/55950355442
An example of a benchmark failing with a worse results than expected: https://github.com/apple/swift-log/actions/runs/19569105729/job/56038101552