Skip to content
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

ref: Instantiating _tags for Spans lazily #2636

Merged
merged 4 commits into from
Sep 19, 2023
Merged

ref: Instantiating _tags for Spans lazily #2636

merged 4 commits into from
Sep 19, 2023

Conversation

bitsandfoxes
Copy link
Contributor

Lazy tag creation for spans.

OLD:
|                  Method | SpanCount |        Mean |        Error |     StdDev |     Gen0 |     Gen1 |  Allocated |
|------------------------ |---------- |------------:|-------------:|-----------:|---------:|---------:|-----------:|
| 'Creates a Transaction' |         1 |    19.95 us |     8.426 us |   0.462 us |   2.2278 |   0.8545 |   11.79 KB |
| 'Creates a Transaction' |        10 |    60.71 us |    28.927 us |   1.586 us |   5.6152 |   2.0752 |   32.29 KB |
| 'Creates a Transaction' |       100 |   485.11 us |    24.521 us |   1.344 us |  40.0391 |  13.6719 |  238.07 KB |
| 'Creates a Transaction' |      1000 | 4,790.64 us | 2,046.437 us | 112.172 us | 390.6250 | 140.6250 | 2291.61 KB |

NEW:
|                  Method | SpanCount |        Mean |       Error |     StdDev |     Gen0 |    Gen1 |  Allocated |
|------------------------ |---------- |------------:|------------:|-----------:|---------:|--------:|-----------:|
| 'Creates a Transaction' |         1 |    19.34 us |    12.07 us |   0.662 us |   1.8616 |  0.6714 |   10.98 KB |
| 'Creates a Transaction' |        10 |    56.41 us |    36.59 us |   2.006 us |   4.5166 |  1.4648 |   24.16 KB |
| 'Creates a Transaction' |       100 |   398.66 us |    27.15 us |   1.488 us |  37.5977 |  9.7656 |  156.81 KB |
| 'Creates a Transaction' |      1000 | 3,723.91 us | 3,241.45 us | 177.675 us | 343.7500 | 85.9375 | 1479.07 KB |

#skip-changelog

Copy link
Member

@bruno-garcia bruno-garcia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dang that was simple, no other calls to Tags that can move to InternalTags?

@bitsandfoxes
Copy link
Contributor Author

dang that was simple, no other calls to Tags that can move to InternalTags?

Nope. All other instances of Tags are not coming from SpanTracer so we only special case that right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants