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

Perf benchmark tests for span creation ( along with context management ) #856

Merged
merged 6 commits into from
Jun 15, 2021

Conversation

lalitb
Copy link
Member

@lalitb lalitb commented Jun 14, 2021

Changes

As we are discussing performance changes for the api, it's important to get some numbers for span creation and context management involved in the process. The tests are:

  • Test to measure performance for single-span creation
  • Test to measure performance for single-span creation with scope ( involves stack )
  • Test to measure performance for nested span creation with scope
  • Test to measure performance for nested span creation with manual span context management (no stack involved)
  • Test to measure performance for nested span creation with context propagation

These are the numbers as tested locally:

------------------------------------------------------------------------------------------
Benchmark                                                Time             CPU   Iterations
------------------------------------------------------------------------------------------
BM_SpanCreation                                        263 ns          263 ns      2538457
BM_SpanCreationWithScope                              2222 ns         2221 ns       314466
BM_NestedSpanCreationWithScope                        7892 ns         7891 ns        87182
BM_SpanCreationWithManualSpanContextPropagation       1164 ns         1164 ns       629233
BM_SpanCreationWitContextPropagation                  6642 ns         6641 ns        97745

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@lalitb lalitb requested a review from a team June 14, 2021 17:35
@codecov
Copy link

codecov bot commented Jun 14, 2021

Codecov Report

Merging #856 (6937a54) into main (8a8ffe5) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #856   +/-   ##
=======================================
  Coverage   95.50%   95.50%           
=======================================
  Files         156      156           
  Lines        6620     6620           
=======================================
  Hits         6322     6322           
  Misses        298      298           

@lalitb lalitb merged commit b073e8b into open-telemetry:main Jun 15, 2021
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