Skip to content

Tweaks to ActivityCreation benchmarks#5173

Merged
utpilla merged 7 commits into
open-telemetry:mainfrom
cijothomas:cijothomas/benchmark-activitycreation
Dec 14, 2023
Merged

Tweaks to ActivityCreation benchmarks#5173
utpilla merged 7 commits into
open-telemetry:mainfrom
cijothomas:cijothomas/benchmark-activitycreation

Conversation

@cijothomas
Copy link
Copy Markdown
Member

  1. Removed parentid, kind scenarios as they don't seem to add additional value over other benchmarks.

.2 Added a benchmark to compare the perf difference between using SetTag vs AddTag. The former does de-duplication+override, the latter does not do this. In scenarios where the tags are controlled (eg: Instrumentation Libraries from this repo), it might be faster to use AddTag instead of SetTag. This PR is simply adding benchmarks to help support that decision (in a future PR) for the instrumentations, and also give a recommendation to end users about the AddTag vs SetTag behavior.
Yes, SetTag is the spec-compliant API, but users who are in full control of their Tags might leverage AddTag to save some unwanted cpu cycles to detect duplicates. The cost increases with each attribute, as the current implementation traverses the list to look for duplicate.

@cijothomas cijothomas requested a review from a team December 14, 2023 01:26
Comment thread test/Benchmarks/Helper/ActivityCreationScenarios.cs Outdated
Comment thread test/Benchmarks/Helper/ActivityCreationScenarios.cs Outdated
Comment thread test/Benchmarks/Helper/ActivityCreationScenarios.cs Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 14, 2023

Codecov Report

Merging #5173 (3a67f93) into main (3ffbef3) will decrease coverage by 0.19%.
Report is 1 commits behind head on main.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5173      +/-   ##
==========================================
- Coverage   83.43%   83.25%   -0.19%     
==========================================
  Files         297      297              
  Lines       12366    12366              
==========================================
- Hits        10318    10295      -23     
- Misses       2048     2071      +23     
Flag Coverage Δ
unittests 83.25% <ø> (-0.19%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 8 files with indirect coverage changes

Comment thread test/Benchmarks/Helper/ActivityCreationScenarios.cs Outdated
Comment thread test/Benchmarks/Helper/ActivityCreationScenarios.cs Outdated
Comment thread test/Benchmarks/Trace/ActivityCreationBenchmarks.cs Outdated
Comment thread test/Benchmarks/Trace/ActivityCreationBenchmarks.cs Outdated
Comment thread test/Benchmarks/Trace/ActivityCreationBenchmarks.cs
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.

2 participants