fix(bench): measure ferrflow_parallel only from the binary method#154
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes a benchmarking harness artifact where ferrflow_parallel was unintentionally measuring npx/Docker startup overhead due to the parallel results file not being scoped by install method. It ensures the “parallel” stat reflects ferrflow’s binary all-cores execution (vs the binary --jobs 1 run), while still pinning --jobs 1 for all ferrflow install methods in the primary comparison.
Changes:
- Only sets
par_cmdforferrflowwhenmethod == "binary"to prevent npm/docker runs from overwritingresults/raw/parallel/${fixture}-${cmd_name}.json. - Keeps ferrflow pinned to
--jobs 1for the main (single-thread comparable) measurement across all install methods.
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.
The parallel result file (
parallel/${fixture}-${cmd}.json) isn't scoped by install method, and ferrflow runs binary → npm → docker. Each method re-ran the parallel hyperfine into the same file, so docker (last) overwrote it —ferrflow_parallelwas really measuringdocker runcontainer startup (~constant 165–280 ms), which made ferrflow's default mode look far slower than--jobs 1.Verified on ubuntu-latest with
--timing:ferrflow checkis 4–6 ms in both--jobs 1and default — no parallel-path overhead. The stat was a harness artifact.Fix: set
par_cmd(the all-cores variant) only for thebinarymethod, so the parallel stat is binary all-cores vs binary--jobs 1. The--jobs 1pinning still applies to every ferrflow method for the single stat.Closes #153