Skip to content

Commit bb9973b

Browse files
committed
perf: ingest repository key to influx
For golang/go#53538. Change-Id: I125b48347e37b10c57ed0050d8e19fd1719e0b59 Reviewed-on: https://go-review.googlesource.com/c/build/+/413687 Run-TryBot: Michael Pratt <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Michael Knyszek <[email protected]>
1 parent 6d0bd06 commit bb9973b

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

perf/app/influx.go

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,15 @@ comparisonLoop:
326326
benchmarksCommit := residues["benchmarks-commit"] // field
327327
baselineCommit := cs.HashPairs[series].DenHash // field
328328
experimentCommit := cs.HashPairs[series].NumHash // field
329+
repository := residues["repository"] // tag
329330
branch := residues["branch"] // tag
330331

332+
// cmd/bench didn't set repository prior to
333+
// CL 413915. Older runs are all against go.
334+
if repository == "" {
335+
repository = "go"
336+
}
337+
331338
// Push to influx.
332339
t, err := benchseries.ParseNormalizedDateString(series)
333340
if err != nil {
@@ -343,12 +350,13 @@ comparisonLoop:
343350
"experiment-commit": experimentCommit,
344351
}
345352
tags := map[string]string{
346-
"name": benchmarkName,
347-
"unit": unit,
348-
"cpu": cpu,
349-
"goarch": goarch,
350-
"goos": goos,
351-
"branch": branch,
353+
"name": benchmarkName,
354+
"unit": unit,
355+
"cpu": cpu,
356+
"goarch": goarch,
357+
"goos": goos,
358+
"repository": repository,
359+
"branch": branch,
352360
// TODO(prattmic): Add pkg, which
353361
// benchseries currently can't handle.
354362
}

0 commit comments

Comments
 (0)