Repository navigation
Use portable benchmark output redirection - #1780
Open
dajiaohuang wants to merge 3 commits into
Open
dajiaohuang wants to merge 3 commits into
dajiaohuang wants to merge 3 commits into
Conversation
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.
Replace Bash-specific &> redirection with >/dev/null 2>&1 in the benchmark wrapper. _benchmarks/bench.sh invokes this executable, which has no shebang, through env time. In the verified Ubuntu invocation, the old form runs the analysis command asynchronously and time records the wrapper exit rather than the complete command runtime.
Validation: used the source wrapper and actual env time invocation, substituting only the hardcoded Staticcheck binary with a command that sleeps for 0.4 seconds. The original wrapper reported 0.00 seconds; the proposed redirection reported 0.42 seconds. This establishes the wrapper timing defect, not a real Staticcheck benchmark/performance measurement. The exact newly created probe directory was removed successfully.
Scope: only redirection changes. The unrelated generic-instantiation change was previously removed in favor of #1764. Historical Bash syntax and git diff --check passed; no full distribution or real benchmark run is claimed.