Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Unified Diff: perf/go/parser/parser_test.go

Issue 610793003: Add ratio calculation to take the ratio of two calculations. (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: add some traces to the test Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« perf/go/parser/funcs.go ('K') | « perf/go/parser/funcs.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: perf/go/parser/parser_test.go
diff --git a/perf/go/parser/parser_test.go b/perf/go/parser/parser_test.go
index 71fbebf5790e8fea8292a02584a59d684212c3ad..9f3a62c82a02393a1757baee1ea901b5ad572f6c 100644
--- a/perf/go/parser/parser_test.go
+++ b/perf/go/parser/parser_test.go
@@ -131,6 +131,12 @@ func TestAve(t *testing.T) {
}
}
+func TestRatio(t *testing.T) {
+ ctx := newTestContext()
+ ctx.Tile.Traces["t1"].(*types.PerfTrace).Values = []float64{1.0, -1.0, 1e100, 1e100}
tfarina 2014/10/16 17:42:30 I think I can have more reasonable numbers in thes
+ ctx.Tile.Traces["t2"].(*types.PerfTrace).Values = []float64{1e100, 2.0, -2.0, 1e100}
+}
tfarina 2014/10/16 17:42:30 Then have: traces, err := ctx.Eval(`ratio( ave(f
+
func TestFill(t *testing.T) {
ctx := newTestContext()
ctx.Tile.Traces["t1"].(*types.PerfTrace).Values = []float64{1e100, 1e100, 2, 3, 1e100, 5}
« perf/go/parser/funcs.go ('K') | « perf/go/parser/funcs.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698