Add CodSpeed performance benchmarks#297
Merged
Merged
Conversation
Contributor
Author
Congrats! CodSpeed is installed 🎉
You will start to see performance impacts in the reports once the benchmarks are run from your default branch.
|
57641f4 to
c9f88f0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR sets up continuous performance tracking for the uutils tar project using CodSpeed.
What's included
Benchmark suite (
benches/bench_tar.rs)Seven benchmarks covering the core tar operations, using divan with the CodSpeed compatibility layer:
create_archive_10_files,create_archive_100_files,create_archive_directory-- measures file-level and directory-level archive creation at different scales.list_archive_50_files,list_archive_verbose_50_files-- measures entry enumeration in simple and verbose mode.extract_archive_20_files-- measures full extraction to disk.build_cli_command-- measures the cost of constructing the clap command definition.Each benchmark creates temporary sample files as setup and exercises the real
uu_taroperation functions directly.CI workflow (
.github/workflows/codspeed.yml)A GitHub Actions workflow that runs benchmarks on every push to
mainand on pull requests, using CodSpeed's simulation mode (CPU instruction counting). This provides deterministic, low-variance measurements regardless of CI runner load.The workflow also supports
workflow_dispatchto allow CodSpeed to trigger backtesting for initial baseline data.Other changes
src/uu/tar/src/tar.rs: Theoperationsmodule is nowpubso the benchmark suite can callcreate_archive,list_archive, andextract_archivedirectly.Cargo.toml: Addedcodspeed-divan-compatas a dev-dependency and the[[bench]]target.README.md: Added CodSpeed badge.Next steps
Once this PR is merged and the benchmarks run on
main, CodSpeed will automatically: