cmd/coordinator: populate commit label on benchmarks

This was lost in one of the many refactorings of CL 38306.

Updates golang/go#19871

Change-Id: I4514d4350feb1420861eae9a9dd021fee5b5ba6f
Reviewed-on: https://go-review.googlesource.com/43052
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Quentin Smith 2017-05-09 17:56:12 -04:00
Родитель 222426324c
Коммит cd5d4b37a9
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -2780,6 +2780,7 @@ func (st *buildStatus) benchFiles() []*benchFile {
if !st.shouldBench() {
return nil
}
// We know rev and rev.Commit.Parents[0] exist because benchmarkItem.buildParent has checked.
rev := st.trySet.ci.Revisions[st.trySet.ci.CurrentRevision]
ps := rev.PatchSetNumber
benchFiles := []*benchFile{
@ -2794,6 +2795,8 @@ func (st *buildStatus) benchFiles() []*benchFile {
benchFiles[0].out.WriteString("staging: true\n")
}
benchFiles[1].out.Write(benchFiles[0].out.Bytes())
fmt.Fprintf(&benchFiles[0].out, "commit: %s\n", rev.Commit.Parents[0].CommitID)
fmt.Fprintf(&benchFiles[1].out, "commit: %s\n", st.builderRev.rev)
return benchFiles
}