Skip to content

Commit 51d7d4d

Browse files
committed
perf: move unrelated types/consts
These are not related to regression detection, so move them from the middle of the regression functions. For golang/go#48803. Change-Id: If9d0d1d7560c54db5da6feb83cdaaffa803ba056 Reviewed-on: https://go-review.googlesource.com/c/build/+/442259 Reviewed-by: David Chase <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Michael Pratt <[email protected]>
1 parent bb9973b commit 51d7d4d

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

perf/app/dashboard.go

+14-14
Original file line numberDiff line numberDiff line change
@@ -428,20 +428,6 @@ func groupBenchmarkResults(res *api.QueryTableResult, byRegression bool) ([]*Ben
428428
return s, nil
429429
}
430430

431-
type gzipResponseWriter struct {
432-
http.ResponseWriter
433-
w *gzip.Writer
434-
}
435-
436-
func (w *gzipResponseWriter) Write(b []byte) (int, error) {
437-
return w.w.Write(b)
438-
}
439-
440-
const (
441-
defaultDays = 30
442-
maxDays = 366
443-
)
444-
445431
// changeScore returns an indicator of the change and direction.
446432
// This is a heuristic measure of the lack of overlap between
447433
// two confidence intervals; minimum lack of overlap (i.e., same
@@ -544,6 +530,20 @@ func worstRegression(b *BenchmarkJSON) regression {
544530
return worst
545531
}
546532

533+
type gzipResponseWriter struct {
534+
http.ResponseWriter
535+
w *gzip.Writer
536+
}
537+
538+
func (w *gzipResponseWriter) Write(b []byte) (int, error) {
539+
return w.w.Write(b)
540+
}
541+
542+
const (
543+
defaultDays = 30
544+
maxDays = 366
545+
)
546+
547547
// search handles /dashboard/data.json.
548548
//
549549
// TODO(prattmic): Consider caching Influx results in-memory for a few mintures

0 commit comments

Comments
 (0)