x/perf/benchfmt: output an error in case the input file is not utf8 encoded #58579
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Related to: #58576
Currently, if a benchmark file is encoded in utf16 (which is the default in windows), the benchstat tool will fail silently. This might be hard to debug to the end user.
I propose that instead of failing silently, the tool should return an error letting the user know their file is not properly encoded.
On windows, running this command:
go test -bench . -count 10 > old.txt
will return a utf16 encoded file by default.It is a simple change, after this line, we just need to add something like:
And then if the user were to run the benchstat tool, they would get that error instead of it failing silently.
The text was updated successfully, but these errors were encountered: