Commit db20a173 authored by Quentin Smith's avatar Quentin Smith

storage/benchfmt: use gomaxprocs as a label, not GOMAXPROCS

Change-Id: Id8fe9565bee87f824d6efbff3f983f0170534603
Reviewed-on: https://go-review.googlesource.com/34933Reviewed-by: default avatarRuss Cox <rsc@golang.org>
parent da991bc8
......@@ -124,10 +124,10 @@ func (p *Printer) Print(r *Result) error {
func parseNameLabels(name string, labels Labels) {
dash := strings.LastIndex(name, "-")
if dash >= 0 {
// Accept -N as an alias for /GOMAXPROCS=N
// Accept -N as an alias for /gomaxprocs=N
_, err := strconv.Atoi(name[dash+1:])
if err == nil {
labels["GOMAXPROCS"] = name[dash+1:]
labels["gomaxprocs"] = name[dash+1:]
name = name[:dash]
}
}
......
......@@ -57,7 +57,7 @@ BenchmarkTwo 2 ns/sec
[]*Result{
{
Labels{"key": "value"},
Labels{"name": "One", "sub1": "foo", "bar": "1", "GOMAXPROCS": "2"},
Labels{"name": "One", "sub1": "foo", "bar": "1", "gomaxprocs": "2"},
2,
"BenchmarkOne/foo/bar=1-2 1 ns/sec",
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment