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 prometheus exporter benchmark #3213

Merged
merged 6 commits into from Sep 22, 2022
Merged

Add prometheus exporter benchmark #3213

merged 6 commits into from Sep 22, 2022

Conversation

dmathieu
Copy link
Member

This adds benchmarks for the prometheus exporter, with different numbers of metrics.

@dmathieu dmathieu added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Sep 21, 2022
@dmathieu
Copy link
Member Author

Benchmarks results on a 2019 Macbook Pro:

open-telemetry/opentelemetry-go/exporters/prometheus› git:(prometheus-benchmark) go test -bench=.
2022/09/21 14:17:44 "invalid.gauge.name" is not a valid metric name
2022/09/21 14:17:44 "invalid.counter.name" is not a valid metric name
2022/09/21 14:17:44 "invalid.hist.name" is not a valid metric name
goos: darwin
goarch: amd64
pkg: go.opentelemetry.io/otel/exporters/prometheus
cpu: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
BenchmarkCollect1-12 76323 16575 ns/op
BenchmarkCollect10-12 37503 31560 ns/op
BenchmarkCollect100-12 6524 182864 ns/op
BenchmarkCollect1000-12 649 1752732 ns/op
BenchmarkCollect10000-12 55 18618929 ns/op
PASS
ok go.opentelemetry.io/otel/exporters/prometheus 6.992s

exporters/prometheus/benchmark_test.go Outdated Show resolved Hide resolved
exporters/prometheus/benchmark_test.go Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Sep 22, 2022

Codecov Report

Merging #3213 (db70ad7) into main (bfaff3a) will decrease coverage by 0.0%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #3213     +/-   ##
=======================================
- Coverage   77.3%   77.3%   -0.1%     
=======================================
  Files        159     159             
  Lines      11139   11139             
=======================================
- Hits        8617    8615      -2     
- Misses      2325    2327      +2     
  Partials     197     197             
Impacted Files Coverage Δ
sdk/trace/batch_span_processor.go 81.1% <0.0%> (-0.9%) ⬇️

@MrAlias MrAlias merged commit 35019d3 into open-telemetry:main Sep 22, 2022
@dmathieu dmathieu deleted the prometheus-benchmark branch September 22, 2022 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants