mirror of
https://github.com/golang/go
synced 2024-11-18 18:44:42 -07:00
dashboard: separate build and non-build metrics in perf dashboard
As per Ian request: >> Let's clearly separate the build numbers from the runtime numbers. >> The build numbers are interesting but there are many things that >> affect them. The runtime numbers are presumably stable. LGTM=adg R=adg CC=golang-codereviews, iant, rsc https://golang.org/cl/154440043
This commit is contained in:
parent
a0cb59fbc3
commit
4201ff03b5
@ -654,6 +654,25 @@ func UpdatePerfConfig(c appengine.Context, r *http.Request, req *PerfRequest) (n
|
||||
return newBenchmark, nil
|
||||
}
|
||||
|
||||
type MetricList []string
|
||||
|
||||
func (l MetricList) Len() int {
|
||||
return len(l)
|
||||
}
|
||||
|
||||
func (l MetricList) Less(i, j int) bool {
|
||||
bi := strings.HasPrefix(l[i], "build-") || strings.HasPrefix(l[i], "binary-")
|
||||
bj := strings.HasPrefix(l[j], "build-") || strings.HasPrefix(l[j], "binary-")
|
||||
if bi == bj {
|
||||
return l[i] < l[j]
|
||||
}
|
||||
return !bi
|
||||
}
|
||||
|
||||
func (l MetricList) Swap(i, j int) {
|
||||
l[i], l[j] = l[j], l[i]
|
||||
}
|
||||
|
||||
func collectList(all []string, idx int, second string) (res []string) {
|
||||
m := make(map[string]bool)
|
||||
for _, str := range all {
|
||||
@ -665,7 +684,7 @@ func collectList(all []string, idx int, second string) (res []string) {
|
||||
res = append(res, v)
|
||||
}
|
||||
}
|
||||
sort.Strings(res)
|
||||
sort.Sort(MetricList(res))
|
||||
return res
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user