-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/perf/cmd/benchstat: ignore lines prefixed with panic:
#68610
Comments
CC @golang/runtime. |
I'm not sure I fully understand the problem you're describing. Can you minimize your inputs a bit to make the problem clearer? benchstat has no idea what packages passed or failed. My best guess is that it looks like you're capturing both stdout and stderr to one file, and benchstat is seeing the "panic: ..." line in obfs.22.txt and thinking it's benchmark metadata. Does it work as expected if you pass |
Hi @aclements -ignore panic works in this case and i am able to see the partial comparisons being generated and put next to each other alongside benchmarks that ran on only one platform as opposed to the whole list being printed separately. The only documentation link i had on benchstat was this one https://pkg.go.dev/golang.org/x/perf/cmd/benchstat and this option was not evident from the page, Thanks a bunch for the option!
|
panic:
I'm glad that worked for you! It does mention "Finally, the -ignore flag can list keys that benchstat should ignore when grouping results." but it's kind of buried, and if you haven't figured out that it's treating "panic" as a key, then it's not clear that's even what you want. I'll redirect this issue to two minor cleanups:
|
Go version
go version go1.22.5 linux/amd64
Output of
go env
in your module/workspace:What did you do?
I was trying to generate a benchstat comparison of the basic Go compiler benchmarks with latest version of Go1.22 and Go1.23rc1 and some of the tests face time outs on either of the Go versions and some on both in a particular set of runs.
For a subset of package directories under go/src I ran for both Go1.22.5 and Go1.23rc1, and generated two output files go1.22.txt and go1.23.txt and ran benchstat go1.22.txt and go1.23.txt
go test -c
go test -bench=. -test.count=n >>output_file
What did you see happen?
In cases where only some tests time out in a particular package and generate a FAIL currently benchstat reports the results of even the tests that ran to completion on both versions separately in different sections of the file rather than as a comparison. If all the tests timed out and there is no data to compare this would be the only option. However since we have some partial data to compare a partial comparison would be useful.
What did you expect to see?
it would be helpful to atleast generate a partial comparison report for that package for those tests that ran fully.
For instance in the example attached document the package bytes causes a timeout for some of the tests on both versions (obfs.23.txt and obfs.22.txt) and if we look at the benchstat output file we see all tests under bytes reported separately in different sections(obfsbenchstatout.txt). If benchstat can generate a partial comparison of atleast the tests that run to completion on both versions it would be very helpful instead of trying to write addon scripts to extract the information ourselves.
The text was updated successfully, but these errors were encountered: