This repository has been archived by the owner on Jul 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 327
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert Attribute to a struct (#581)
This avoids about 30% of allocations in benchmarks with 3 or more attributes and sampling enabled. ``` name old time/op new time/op delta StartEndSpan-8 522ns ± 0% 502ns ± 0% ~ (p=1.000 n=1+1) SpanWithAnnotations_3-8 1.22µs ± 0% 1.08µs ± 0% ~ (p=1.000 n=1+1) SpanWithAnnotations_6-8 1.66µs ± 0% 1.29µs ± 0% ~ (p=1.000 n=1+1) TraceID_DotString-8 191ns ± 0% 185ns ± 0% ~ (p=1.000 n=1+1) SpanID_DotString-8 172ns ± 0% 174ns ± 0% ~ (p=1.000 n=1+1) name old alloc/op new alloc/op delta StartEndSpan-8 576B ± 0% 576B ± 0% ~ (all equal) SpanWithAnnotations_3-8 1.37kB ± 0% 1.27kB ± 0% ~ (p=1.000 n=1+1) SpanWithAnnotations_6-8 1.49kB ± 0% 1.30kB ± 0% ~ (p=1.000 n=1+1) TraceID_DotString-8 80.0B ± 0% 80.0B ± 0% ~ (all equal) SpanID_DotString-8 56.0B ± 0% 56.0B ± 0% ~ (all equal) name old allocs/op new allocs/op delta StartEndSpan-8 4.00 ± 0% 4.00 ± 0% ~ (all equal) SpanWithAnnotations_3-8 13.0 ± 0% 10.0 ± 0% ~ (p=1.000 n=1+1) SpanWithAnnotations_6-8 18.0 ± 0% 12.0 ± 0% ~ (p=1.000 n=1+1) TraceID_DotString-8 3.00 ± 0% 3.00 ± 0% ~ (all equal) SpanID_DotString-8 3.00 ± 0% 3.00 ± 0% ~ (all equal) ```
- Loading branch information
Ramon Nogueira
authored
Mar 14, 2018
1 parent
3539f4d
commit 821173a
Showing
3 changed files
with
75 additions
and
82 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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