-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Open
golang/perf
#9Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Description
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:
if !utf8.Valid(line) {
r.err = fmt.Errorf("%s: invalid encode, only utf8 encoded files are supported", r.result.fileName)
return false
}
And then if the user were to run the benchstat tool, they would get that error instead of it failing silently.
Metadata
Metadata
Assignees
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.