Repository navigation
M6 follow-up: baseline.sh reports failed runs; reword the CPU finding - #30
Merged
Merged
Conversation
- tools/perf/baseline.sh: each tool's output went through `grep -o 'Aggregated.*'`, so a failed run lost what the tool printed, and under `set -e` and `pipefail` the script stopped without a word. A run that ends without its summary line now prints the tool's last lines and says so, and the script still stops. - docs/8 §6.1 and PLAN.md: the CPU the 1 KiB runs measured is the client side's, the producer's and that of `perf` driving it, not the producer's alone.
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.
Two loose ends from #28, the benchmarks and the baseline.
Problem
tools/perf/baseline.shstops on a failed run without saying anything.grep -o 'Aggregated.*', which drops whatever the tool printed about the failure.set -eandpipefail, the empty grep stops the script with exit status 1 and no message. So doesratefinding no record count.docs/8-quality.md§6.1 andPLAN.mdsay the producer is bound by its own CPU. What the 1 KiB runs measured is the CPU of the whole client side: the producer, andperf, which drives it.Example
Here is a run that fails:
perfagainst a port nothing listens on.Through the old filter, a failed run printed only its header, and the script exited:
Change
A new
summary()replaces the baregrepinrust()andjava(). It prints the summary lines as before. When a run ends without them, it prints the tool's last 20 lines and a message, then fails, which stops the script as before:docs/8-quality.md§6.1 andPLAN.mdnow say that the client side is bound by its CPU, meaning the producer andperfdriving it. The 3 µs or so of CPU each message costs includesperf's share.Testing
bash -nandshellcheckpass.summaryalone, with and without summary lines:summaryon a failing run piped intorate, asproducedoes: the message, then exit 1.perf produceagainst a closed port, throughsummary: the output shown above.tools/perf/baseline.sh throughput-10kend to end: both clients' summary lines and rates, as before.