Skip to content

ci: add CodSpeed benchmarks for updatedb and locate - #705

Merged
sylvestre merged 1 commit into
uutils:mainfrom
sylvestre:bench-2
Jun 6, 2026
Merged

sylvestre merged 1 commit into
uutils:mainfrom
sylvestre:bench-2

Conversation

@sylvestre

Copy link
Copy Markdown
Contributor

Drive both utilities end-to-end through their real entry points.

  • benches/updatedb_bench.rs: walks a generated tree (~8.5k paths) and writes a LOCATE02 database, measuring the walk + front-coding + write (full build and a -regex/-prune variant). Empty prune options keep the run deterministic regardless of temp_dir location.
  • benches/locate_bench.rs: builds the database once via updatedb, then scans it in -c/count mode so database decoding and pattern matching dominate (no-match, substring, -b basename, -i ignore-case, -r regex). Unix-only, matching the locate module's cfg.

The existing CodSpeed workflow picks these up via cargo codspeed build/run.

Drive both utilities end-to-end through their real entry points.

- benches/updatedb_bench.rs: walks a generated tree (~8.5k paths) and
  writes a LOCATE02 database, measuring the walk + front-coding + write
  (full build and a -regex/-prune variant). Empty prune options keep the
  run deterministic regardless of temp_dir location.
- benches/locate_bench.rs: builds the database once via updatedb, then
  scans it in -c/count mode so database decoding and pattern matching
  dominate (no-match, substring, -b basename, -i ignore-case, -r regex).
  Unix-only, matching the locate module's cfg.

The existing CodSpeed workflow picks these up via cargo codspeed build/run.
@codecov

codecov Bot commented Jun 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.05%. Comparing base (33703b7) to head (9d41380).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #705   +/-   ##
=======================================
  Coverage   92.05%   92.05%           
=======================================
  Files          35       35           
  Lines        7090     7090           
  Branches      367      367           
=======================================
  Hits         6527     6527           
  Misses        420      420           
  Partials      143      143           

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

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

@codspeed

codspeed Bot commented Jun 6, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 13 untouched benchmarks
🆕 7 new benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
🆕 basename N/A 9.2 ms N/A
🆕 count_many N/A 9.9 ms N/A
🆕 count_no_match N/A 9.7 ms N/A
🆕 ignore_case N/A 9.8 ms N/A
🆕 regex N/A 14.5 ms N/A
🆕 build_full N/A 24.1 ms N/A
🆕 build_pruned N/A 16.3 ms N/A

Comparing sylvestre:bench-2 (9d41380) with main (33703b7)

Open in CodSpeed

@sylvestre
sylvestre marked this pull request as ready for review June 6, 2026 09:00
@sylvestre
sylvestre merged commit fc446ab into uutils:main Jun 6, 2026
22 checks passed
@sylvestre
sylvestre deleted the bench-2 branch June 6, 2026 09:00
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.

1 participant