Repository navigation
fix(cli): suppress stdout when --benchmark is provided - #626
Closed
GanizaniSitara wants to merge 1 commit into
Closed
GanizaniSitara wants to merge 1 commit into
GanizaniSitara wants to merge 1 commit into
Conversation
The --benchmark flag documentation states it will Measure only, skip output. However, the suppression logic only checked for --no-output. This commit adds --benchmark to the suppress_stdout condition to honor the documented behavior and prevent terminal flooding during benchmarks.
Collaborator
|
Thank you — this was a correct read of the Two reasons it landed that way rather than merging this PR directly: One change on the way in: the decision moved into a pure |
deep-soft
pushed a commit
to deep-soft/UltraFastFileSearch-Rust
that referenced
this pull request
Oct 6, 2026
`uffs --help` documents `--benchmark` as "Measure only, skip output", and the profile summary already treats it like `--profile`. But the stdout-suppression check honoured only `--no-output`, so a benchmark against a wide query printed every matching row and the timing line scrolled straight off the terminal. The decision moves into a pure `should_suppress_stdout` helper so it is unit-testable without a daemon, with a regression test covering both flags, flag position, a plain search, `--profile` alone, and a value that merely contains the flag text. Reported with a one-line fix in skyllc-ai#626; landed here as a signed commit because main requires signed commits and first-contributor CI does not run without approval. Co-authored-by: GanizaniSitara <7934938+GanizaniSitara@users.noreply.github.com>
deep-soft
pushed a commit
to deep-soft/UltraFastFileSearch-Rust
that referenced
this pull request
Oct 6, 2026
`--benchmark` used to skip the client-side write entirely (the skyllc-ai#626 fix), so per-row formatting, shmem reads and blob copies were never measured — the one thing a benchmark of a file-search tool is for. The rows now run through the real formatter into a byte-counting sink and the profile block prints an `Output (sink)` line with the elapsed time and bytes produced; only the terminal is left out. `--benchmark -v` sends the same output to the real stdout. `--no-output` stays the match-only switch: the daemon builds no rows, so it times "how many files match" and nothing else (auto-set when stdout is NUL). The profile is printed after the output pass so `--profile` reports the real stdout cost too. A client-side timeout now prints what actually happened — the daemon is still running the search, most likely paging parked drives back in — instead of a bare "request timed out". `render_native_results_into` lives in `output/render_into.rs` for the file-size policy.
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 --benchmark flag documentation states it will 'Measure only, skip output'. However, the suppression logic only checked for --no-output. This PR adds --benchmark to the suppress_stdout condition to honor the documented behavior and prevent terminal flooding during benchmarks.