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

Add benchmark tests for Sum Aggregation #1949 #1948

Merged
merged 14 commits into from
Feb 22, 2023

Conversation

lalitb
Copy link
Member

@lalitb lalitb commented Feb 1, 2023

Fixes #1949

Changes

  • Add benchmark tests for Sum Aggregation
    • Generate 100000 measurements, sleeping for 2ns after every 500 measurements.
    • Collect metrics in-between after generating 1000 measurements, and then in the end.
  • Also modified Histogram Aggregation benchmark to generate similar measurements. It was earlier generating only one measurement.
  • Created a common utils file containing mock classes used across most of the unit-tests.

The benchmark result for Sum Aggregation ( ~57ms to process 100000 measurement, along with collection 100 metrics collection)

$ ./sum_aggregation_benchmark
2023-02-01 00:18:41
Running ./sum_aggregation_benchmark
Run on (20 X 2808.01 MHz CPU s)
CPU Caches:
  L1 Data 32K (x10)
  L1 Instruction 32K (x10)
  L2 Unified 256K (x10)
  L3 Unified 20480K (x1)
Load Average: 3.65, 1.14, 1.55
------------------------------------------------------------
Benchmark                  Time             CPU   Iterations
------------------------------------------------------------
BM_SumAggregation   57306062 ns     57233754 ns           13

The benchmark result for Histogram Aggregation ( ~66ms to process 100000 measurement, along with collection 100 metrics collection)

$ ./histogram_aggregation_benchmark
2023-02-01 00:19:43
Running ./histogram_aggregation_benchmark
Run on (20 X 2808.01 MHz CPU s)
CPU Caches:
  L1 Data 32K (x10)
  L1 Instruction 32K (x10)
  L2 Unified 256K (x10)
  L3 Unified 20480K (x1)
Load Average: 1.34, 0.93, 1.45
------------------------------------------------------------------
Benchmark                        Time             CPU   Iterations
------------------------------------------------------------------
BM_HistogramAggregation   66169891 ns     66106382 ns           11

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 February 1, 2023 06:56
@codecov
Copy link

codecov bot commented Feb 1, 2023

Codecov Report

Merging #1948 (35e430c) into main (5c121cf) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1948   +/-   ##
=======================================
  Coverage   87.29%   87.29%           
=======================================
  Files         166      166           
  Lines        4662     4662           
=======================================
  Hits         4069     4069           
  Misses        593      593           

@lalitb lalitb marked this pull request as draft February 1, 2023 07:40
@lalitb lalitb marked this pull request as ready for review February 1, 2023 08:26
@lalitb lalitb changed the title Metrics benchmark Add benchmark tests for Sum Aggregation #1949 Feb 1, 2023
@esigo esigo self-assigned this Feb 8, 2023
Copy link
Member

@esigo esigo left a comment

Choose a reason for hiding this comment

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

LGTM
Thanks for the PR :)

@esigo esigo added the ok-to-merge The PR is ok to merge (has two approves or raised by a maintainer/approver and has one approve) label Feb 22, 2023
@lalitb lalitb enabled auto-merge (squash) February 22, 2023 19:30
@lalitb lalitb merged commit 7c0826e into open-telemetry:main Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-merge The PR is ok to merge (has two approves or raised by a maintainer/approver and has one approve)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add benchmark tests for Sum Aggregation
2 participants