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

feat(sdk-metrics): apply binary search in histogram recording #3539

Merged
merged 2 commits into from
Jan 31, 2023

Conversation

legendecas
Copy link
Member

Which problem is this PR solving?

Binary search the sorted histogram boundaries to find the lower bound to increment.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • binarySearchLB

Checklist:

  • Followed the style guidelines of this project
  • Unit tests have been added

@legendecas legendecas requested a review from a team as a code owner January 17, 2023 08:09
@codecov
Copy link

codecov bot commented Jan 17, 2023

Codecov Report

Merging #3539 (eba8204) into main (279458e) will decrease coverage by 0.07%.
The diff coverage is 100.00%.

❗ Current head eba8204 differs from pull request most recent head 8f594cc. Consider uploading reports for the commit 8f594cc to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3539      +/-   ##
==========================================
- Coverage   93.88%   93.81%   -0.07%     
==========================================
  Files         255      249       -6     
  Lines        7752     7651     -101     
  Branches     1611     1591      -20     
==========================================
- Hits         7278     7178     -100     
+ Misses        474      473       -1     
Impacted Files Coverage Δ
packages/sdk-metrics/src/aggregator/Histogram.ts 92.00% <100.00%> (-0.21%) ⬇️
packages/sdk-metrics/src/utils.ts 98.43% <100.00%> (+0.39%) ⬆️
...y-sdk-trace-base/src/export/ConsoleSpanExporter.ts 78.57% <0.00%> (-1.43%) ⬇️
...ges/opentelemetry-instrumentation-http/src/http.ts 93.89% <0.00%> (-0.33%) ⬇️
...al/packages/otlp-transformer/src/trace/internal.ts 96.29% <0.00%> (-0.26%) ⬇️
...imental/packages/opentelemetry-sdk-node/src/sdk.ts 93.54% <0.00%> (ø)
...entelemetry-instrumentation-grpc/src/grpc/index.ts 93.98% <0.00%> (ø)
...elemetry-instrumentation-grpc/src/grpc-js/index.ts 92.30% <0.00%> (ø)
...trics/src/aggregator/exponential-histogram/util.ts
.../aggregator/exponential-histogram/mapping/types.ts
... and 8 more

@legendecas legendecas merged commit 2a76d88 into open-telemetry:main Jan 31, 2023
@legendecas legendecas deleted the metrics/binary-histogram branch January 31, 2023 06:45
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

4 participants