benchmarks: add tracing-noop comparison; restructure to produce line graphs #194
+67
−20
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.
Hi! I'm a
tracing
maintainer. Overall, I'm really excited to see people working in this space! I have a few disorganized thoughts:minitrace
is performing the equivalent of a noop. When I madetracing
do the same thing, I've found thattracing
is a little faster than minitrace. When I comparedcompare/Tokio Tracing/1000
tocompare/minitrace/1000
(after adding a no-optracing
subscriber but before renaming it in this PR, I found thattracing
clocked in at 4.7097μs, whileminitrace
clocked in at 26.920μs. I'm pretty sure that this can be chalked up to different priorities/approaches, in thatminitrace
opts to off-load spans to a background thread by default, whiletracing
does not.tracing-opentelemetry
and the Rustopentelemetry
crates. Removing the usage ofBox
andArc
inside ofopentelemetry
and having a more efficient Registry intracing-subscriber
could go a long way in closing the performance gap you've observed. I'm not even talking about moving span handling/creation into a background thread for tracing-opentelemetry, but that's certainly in the cards to reduce latency.tracing
can ever get there, I think we can make a default level for spans.tracing
isn't necessarily treating as its top priority.The structuring of the benchmarks allows for creating line charts like the following:
.
On my M1 Mac, these are the results of me running the benchmarks:
cargo bench --bench compare