Skip to content

fix(cli): suppress stdout when --benchmark is provided - #626

Closed
GanizaniSitara wants to merge 1 commit into
skyllc-ai:mainfrom
GanizaniSitara:fix/benchmark-output-suppression
Closed

GanizaniSitara wants to merge 1 commit into
skyllc-ai:mainfrom
GanizaniSitara:fix/benchmark-output-suppression

Conversation

@GanizaniSitara

Copy link
Copy Markdown
Contributor

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.

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.
@githubrobbi

Copy link
Copy Markdown
Collaborator

Thank you — this was a correct read of the --help text, and the fix is right. It's now on main as commit cef4af2 (v0.6.42), with you credited as co-author.

Two reasons it landed that way rather than merging this PR directly: main's ruleset requires signed commits, and CI doesn't run for a first contribution without maintainer approval, so this branch could never go green on its own. Landing it as a signed commit was the fastest honest path.

One change on the way in: the decision moved into a pure should_suppress_stdout helper with a regression test covering both flags, flag position, a plain search, --profile alone, and a value that merely contains the flag text — so the behaviour you fixed can't silently regress. Closing as landed.

@githubrobbi githubrobbi closed this Oct 2, 2026
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.
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.

2 participants