Closed ivanvc closed 5 months ago
/cc @tjungblu @ahrtr
I think the reason it has split pipes is to not have the progress output mingled together with the result output. Maybe we should swap those?
As for it being a breaking change, I think that's a rather minor breakage... I'm not even sure if anyone else besides us is using the command.
I think the reason it has split pipes is to not have the progress output mingled together with the result output. Maybe we should swap those?
My understanding is that we only print errors and usage to Stderr
, all others (including progress and results) should go to Stdout
?
I think the reason it has split pipes is to not have the progress output mingled together with the result output. Maybe we should swap those?
@tjungblu, I'm sorry, I may not have understood you. Are you suggesting sending progress and errors to stdout
and the result to stderr
?
My understanding is that we only print errors and usage to
Stderr
, all others (including progress and results) should go toStdout
?
@ahrtr, I don't know if my point of view is biased or opinionated, but it makes sense to me that only the application's actual output goes to stdout
.
For example, if I want to pipe or use the results from a bench
run, if there's progress report on stdout,
I'll need to filter it before I can work with it. i.e.,:
./bbolt bench -gobench-output -write-mode rnd -read-mode seq 2>/dev/null | grep ^Benchmark | tee result.txt
# vs.
./bbolt bench -gobench-output -write-mode rnd -read-mode seq 2>/dev/null | tee result.txt
benchstat result.txt result-old.txt ...
only the application's actual output goes to
stdout
.For example, if I want to pipe or use the results from a
bench
run, if there's progress report onstdout,
I'll need to filter it before I can work with it. i.e.,:./bbolt bench -gobench-output -write-mode rnd -read-mode seq 2>/dev/null | grep ^Benchmark | tee result.txt # vs. ./bbolt bench -gobench-output -write-mode rnd -read-mode seq 2>/dev/null | tee result.txt benchstat result.txt result-old.txt ...
Sounds good to me.
/lgtm
Follow-up on #765, and work towards #750 and #739.
This PR changes the output of the
bench
results tostdout
rather thanstderr
for ease of working with the output.However, I'm unsure if we would consider this a breaking change. If we want to delay this change, I can work around this.