Skip to content

Conversation

@not-matthias
Copy link
Member

No description provided.

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 20, 2025

CodSpeed Performance Report

Merging #152 will degrade performance by 25.75%

Comparing cod-1711-codspeed-rust-add-analysis-mode-support (d022e35) with main (9181bce)

Summary

⚡ 14 improvements
❌ 8 regressions
✅ 344 untouched
🆕 2 new

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Mode Benchmark BASE HEAD Efficiency
WallTime Iterative 21 ns 20 ns +5%
WallTime large_drop 808.1 µs 192.6 µs ×4.2
WallTime Iterative[21] 22 ns 21 ns +4.76%
WallTime Iterative[20] 21 ns 20 ns +5%
🆕 WallTime allocate N/A 1 s N/A
WallTime generate_combinations[9] 5.7 µs 7.7 µs -25.75%
WallTime hamiltonian_cycle[5] 959 ns 1,217 ns -21.2%
WallTime graph_coloring[4] 989 ns 1,109 ns -10.82%
WallTime hamiltonian_cycle[7] 1.9 µs 1.1 µs +76.25%
WallTime graph_coloring[5] 1.1 µs 1.4 µs -23.75%
WallTime n_queens_solver[6] 20.9 µs 20.1 µs +3.64%
🆕 Simulation allocate N/A 28.5 µs N/A
Simulation string_copy_with_bytes_counter 798.1 ns 768.1 ns +3.91%
Simulation process_items_with_counter 835.8 ns 806.7 ns +3.62%
Simulation iterative[0] 148.3 ns 119.2 ns +24.48%
Simulation print_env_hello 8.2 µs 7.7 µs +6.47%
Simulation rat_in_maze[5] 5.7 µs 5.6 µs +3.14%
Simulation recursive_memoized[BTreeMap<u64, u64>, 0] 371.7 ns 430.3 ns -13.62%
Simulation Iterative 132.5 ns 161.9 ns -18.18%
Simulation Iterative[21] 134.2 ns 163.6 ns -18%
... ... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

@not-matthias not-matthias changed the title chore: wip [skip ci] feat: add support for analysis mode Nov 20, 2025
@not-matthias not-matthias force-pushed the cod-1711-codspeed-rust-add-analysis-mode-support branch 2 times, most recently from 5bab4b1 to f2e74d7 Compare November 21, 2025 15:33
@not-matthias not-matthias requested a review from Copilot November 21, 2025 15:33
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for a new "analysis" measurement mode to the CodSpeed benchmarking framework. The analysis mode enables instrumentation similar to simulation mode and integrates with instrument hooks for tracking benchmark execution.

Key changes:

  • Introduced a new Analysis variant to the MeasurementMode enum
  • Integrated InstrumentHooks for tracking benchmark lifecycle events
  • Removed the deprecated is_instrumented() function and RunningOnValgrind enum variant

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
crates/divan_compat/examples/benches/alloc.rs New benchmark file for testing memory allocation scenarios
crates/divan_compat/examples/Cargo.toml Added the new alloc benchmark to the build configuration
crates/codspeed/src/request/mod.rs Removed unused RunningOnValgrind client request variant
crates/codspeed/src/measurement.rs Removed deprecated is_instrumented() function
crates/codspeed/src/codspeed.rs Integrated InstrumentHooks for benchmark lifecycle tracking
crates/cargo-codspeed/src/measurement_mode.rs Added Analysis variant to measurement modes
crates/cargo-codspeed/src/build.rs Extended codspeed cfg flag to apply to analysis mode
.github/workflows/ci.yml Added CI workflow for testing memory analysis integration
crates/codspeed/instrument-hooks Updated submodule commit reference

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@not-matthias not-matthias marked this pull request as ready for review November 24, 2025 09:52
@not-matthias not-matthias force-pushed the cod-1711-codspeed-rust-add-analysis-mode-support branch from f2e74d7 to 435a805 Compare November 24, 2025 10:26
Copy link
Contributor

@GuillaumeLagrange GuillaumeLagrange left a comment

Choose a reason for hiding this comment

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

olgtm

@not-matthias not-matthias force-pushed the cod-1711-codspeed-rust-add-analysis-mode-support branch 2 times, most recently from 433456e to 274a517 Compare November 27, 2025 15:04
@not-matthias not-matthias force-pushed the cod-1711-codspeed-rust-add-analysis-mode-support branch 2 times, most recently from 7eaae17 to fa4e22b Compare November 27, 2025 15:27
Copy link
Contributor

@GuillaumeLagrange GuillaumeLagrange left a comment

Choose a reason for hiding this comment

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

olgtm, although CI outputed the No performance analysis stuff, is this expected with memory mapping not being merged all the way ?

@not-matthias not-matthias force-pushed the cod-1711-codspeed-rust-add-analysis-mode-support branch from 0a30bef to 1fe0cb0 Compare December 18, 2025 10:00
@not-matthias not-matthias force-pushed the cod-1711-codspeed-rust-add-analysis-mode-support branch 2 times, most recently from a0fe3b6 to 4652f6c Compare December 18, 2025 14:45
@avalanche-staging
Copy link

avalanche-staging bot commented Dec 18, 2025

CodSpeed Performance Report

Congrats! CodSpeed is installed 🎉

🆕 603 new benchmarks were detected.

You will start to see performance impacts in the reports once the benchmarks are run from your default branch.

Detected benchmarks


ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

@not-matthias not-matthias force-pushed the cod-1711-codspeed-rust-add-analysis-mode-support branch 2 times, most recently from 5a3b61f to 3d968aa Compare December 18, 2025 17:08
@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-1711-codspeed-rust-add-analysis-mode-support branch 2 times, most recently from a7bd1c0 to 5a102ae Compare December 19, 2025 11:51
@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-1711-codspeed-rust-add-analysis-mode-support branch 3 times, most recently from e5e19b5 to baad89c Compare December 19, 2025 14:15
@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-1711-codspeed-rust-add-analysis-mode-support branch 3 times, most recently from df6950a to 031806b Compare December 19, 2025 17:06
@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-1711-codspeed-rust-add-analysis-mode-support branch from 6020ca6 to cd1a884 Compare December 19, 2025 17:30
@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-1711-codspeed-rust-add-analysis-mode-support branch from cd1a884 to d022e35 Compare December 19, 2025 17:51
@GuillaumeLagrange GuillaumeLagrange merged commit d022e35 into main Dec 19, 2025
67 of 71 checks passed
@GuillaumeLagrange GuillaumeLagrange deleted the cod-1711-codspeed-rust-add-analysis-mode-support branch December 19, 2025 18:20
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.

4 participants