opentelemetry-collector icon indicating copy to clipboard operation
opentelemetry-collector copied to clipboard

[docs] Add performance benchmarking guide and contributor guidelines

Open aviralgarg05 opened this issue 2 weeks ago • 5 comments

Description

This commit addresses issue #14111 by documenting the investigation into performance change detection tooling for the OpenTelemetry Collector.

Changes:

  • Created comprehensive performance-benchmarking.md guide covering:
    • Running benchmarks locally (make gobenchmark, timebenchmark)
    • Writing benchmark tests following Go conventions
    • CodSpeed continuous performance monitoring integration
    • Best practices for performance-sensitive code changes
    • Troubleshooting common benchmark issues
  • Updated CONTRIBUTING.md with Performance Testing section
  • Added changelog entry documenting the enhancement

The investigation found that CodSpeed (integrated in PR #14160) provides continuous performance regression detection on all PRs and commits to main, with <1% variance and commit-level differential flamegraphs.

This documentation enables contributors to understand the performance testing infrastructure and follow best practices when making changes that could affect collector performance.

Link to tracking issue

Fixes #14111

Testing

NA

Documentation

Created Performance Benchmarking Guide File: docs/performance-benchmarking.md Updated CONTRIBUTING.md File: CONTRIBUTING.md

aviralgarg05 avatar Nov 29 '25 10:11 aviralgarg05

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: aviralgarg05 / name: Aviral Garg (8021aaabc77f65c7b137ce042693197258060f91, cf33fe26e8b3342df2fb43374244e13704f30fe7)

Please avoid force-pushing PRs. That breaks the GitHub review UI.

dmathieu avatar Dec 01 '25 09:12 dmathieu

Please avoid force-pushing PRs. That breaks the GitHub review UI.

Sorry! will keep in mind next time

aviralgarg05 avatar Dec 01 '25 09:12 aviralgarg05

CodSpeed Performance Report

Merging #14234 will improve performances by ×2.9

Comparing aviralgarg05:docs/add-performance-benchmarking-guide (8021aaa) with main (7012862)

:warning: Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

Summary

⚡ 2 improvements
✅ 71 untouched

Benchmarks breakdown

Benchmark BASE HEAD Change
zstdWithConcurrency 19 µs 6.6 µs ×2.9
BenchmarkSplittingBasedOnItemCountManySmallLogs 3.3 ms 2.4 ms +35.11%

codspeed-hq[bot] avatar Dec 01 '25 09:12 codspeed-hq[bot]

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 92.16%. Comparing base (7012862) to head (8021aaa).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14234      +/-   ##
==========================================
- Coverage   92.16%   92.16%   -0.01%     
==========================================
  Files         668      668              
  Lines       41463    41463              
==========================================
- Hits        38216    38214       -2     
- Misses       2214     2215       +1     
- Partials     1033     1034       +1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Dec 01 '25 09:12 codecov[bot]