Skip to content

test(fmt): add file discovery benchmark - #326

Merged
chenjiahan merged 1 commit into
mainfrom
chenjiahan/test-fmt-discovery-baseline
Aug 12, 2026
Merged

test(fmt): add file discovery benchmark#326
chenjiahan merged 1 commit into
mainfrom
chenjiahan/test-fmt-discovery-baseline

Conversation

@chenjiahan

Copy link
Copy Markdown
Member

Summary

This PR adds a repeatable rs fmt file-discovery benchmark so future Rust traversal work can be compared against a stable baseline. It reports discovered file counts, median latency, and p95 latency after configurable warmup and measured runs, and adds regression coverage for nested-CWD Git ignore ancestry and absolute targets outside the working directory.

Performance

Measured on an Apple M3 Max with Node.js v24.12.0 using an optimized native binding, with 10 warmup runs and 50 measured runs:

Scenario Files Median p95
Rstack, 1 explicit file 1 0.016 ms 0.030 ms
Rstack, 100 explicit files 100 0.641 ms 0.885 ms
Rstack, directory traversal 551 2.699 ms 3.617 ms
Rspack, directory traversal 21,140 142.095 ms 154.688 ms

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying rstack-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: 882bd42
Status: ✅  Deploy successful!
Preview URL: https://45035d6e.rstack-cli.pages.dev
Branch Preview URL: https://chenjiahan-test-fmt-discover.rstack-cli.pages.dev

View logs

@chenjiahan
chenjiahan merged commit 9872736 into main Aug 12, 2026
5 checks passed
@chenjiahan
chenjiahan deleted the chenjiahan/test-fmt-discovery-baseline branch August 12, 2026 03:03
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