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

Adding Baggage api benchmark tests #861

Merged
merged 2 commits into from
Jun 18, 2021

Conversation

lalitb
Copy link
Member

@lalitb lalitb commented Jun 16, 2021

Fixes #837

Changes

Add performance benchmark tests for Baggage. This would be important to evaluate the performance of the internal key-value data structure used for Baggage and TraceState.
Tests are using

  • 10 key-value pair entries in baggage ( Optimal scenario used most of the time).
  • 180 key-value pair entries in baggage ( Max possible entries).
    with decently sized keys and values.

The result from running locally:

CPU Caches:
  L1 Data 32K (x4)
  L1 Instruction 32K (x4)
  L2 Unified 256K (x4)
  L3 Unified 8192K (x1)
Load Average: 0.38, 0.44, 0.35
----------------------------------------------------------------------------
Benchmark                                  Time             CPU   Iterations
----------------------------------------------------------------------------
BM_CreateBaggageFromTenEntries         14671 ns        14671 ns        44127
BM_ExtractBaggageHavingTenEntries        361 ns          361 ns      1853059
BM_CreateBaggageFrom180Entries        271756 ns       271757 ns         2541
BM_ExtractBaggageWith180Entries         5815 ns         5815 ns       115602
BM_SetValueBaggageWithTenEntries        2344 ns         2344 ns       301103
BM_SetValueBaggageWith180Entries       42179 ns        42179 ns        16987
BM_BaggageToHeaderTenEntries            3992 ns         3992 ns       178561
BM_BaggageToHeader180Entries           69452 ns        69451 ns         9263

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 16, 2021 07:20
@lalitb lalitb changed the title baggage benchmark Adding Baggage api benchmark tests Jun 16, 2021
@codecov
Copy link

codecov bot commented Jun 16, 2021

Codecov Report

Merging #861 (4e24e5e) into main (a779c3b) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

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

@lalitb lalitb merged commit 61c0139 into open-telemetry:main Jun 18, 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.

Add performance benchmark tests for Baggage API
2 participants