Skip to content

Conversation

@scottgerring
Copy link
Member

@scottgerring scottgerring commented Feb 25, 2025

Changes

This change sets us up to be able to run criterion performance regressions as part of the CI suite, annotating the PR with the results. As we've invested time into doing the performance tests, it would be great to be able to use them to monitor performance changes, and this is a relatively simple job.

I reckon this will also be helpful in the context of #2378 , where @bantonsson has spent some time demonstrating this his new Context impl is faster than the previous.

The change is split into two:

You can see what this looks like in action over in the faked up PR => scotts-test-organization#1

Without the first PR, the second PRs workflow will not succeed.

Details

To run criterion with additional CLI arguments across an entire crate at once - not just --bench my_bench - we need to stop libtest being added to the targets of the crates that contain benches. This is discussed in the criterion FAQ.

This change allows you to run the following for each of the crates we publish with

# From opentelemetry
 cargo bench -- --save-baseline abc

# From opentelemetry-appender-tracing
cargo bench --features spec_unstable_logs_enabled -- --save-baseline abc

# From opentelemetry-sdk
 cargo bench --features rt-tokio,testing,metrics,logs,spec_unstable_metrics_views -- --save-baseline abc

Merge requirement checklist

  • CONTRIBUTING guidelines followed
  • Unit tests added/updated (if applicable)
  • Appropriate CHANGELOG.md files updated for non-trivial, user-facing changes
  • Changes in public API reviewed (if applicable)

@codecov
Copy link

codecov bot commented Feb 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.3%. Comparing base (a70affd) to head (a3be162).
Report is 8 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #2705   +/-   ##
=====================================
  Coverage   79.2%   79.3%           
=====================================
  Files        123     123           
  Lines      22572   22660   +88     
=====================================
+ Hits       17885   17977   +92     
+ Misses      4687    4683    -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@scottgerring scottgerring marked this pull request as ready for review February 25, 2025 12:09
@scottgerring scottgerring requested a review from a team as a code owner February 25, 2025 12:09
@cijothomas cijothomas merged commit 59af7e2 into open-telemetry:main Feb 25, 2025
21 checks passed
bantonsson pushed a commit to bantonsson/opentelemetry-rust that referenced this pull request Oct 9, 2025
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.

2 participants