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

Unified Diff: perf/go/types/types.go

Issue 880483003: Add types.MatchesWithIngores(). (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « no previous file | perf/go/types/types_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: perf/go/types/types.go
diff --git a/perf/go/types/types.go b/perf/go/types/types.go
index 97014b6ecb0ee94e61ea6fa263eb8a763e2a2986..a7f651c9a9a62a1b1e593df6d9a407c1ffff61ac 100644
--- a/perf/go/types/types.go
+++ b/perf/go/types/types.go
@@ -61,6 +61,20 @@ func Matches(tr Trace, query url.Values) bool {
return true
}
+// MatchesWithIgnores returns true if the given Trace matches the given query
+// and none of the ignore queries.
+func MatchesWithIgnores(tr Trace, query url.Values, ignores ...url.Values) bool {
+ if !Matches(tr, query) {
+ return false
+ }
+ for _, i := range ignores {
+ if Matches(tr, i) {
+ return false
+ }
+ }
+ return true
+}
+
// PerfTrace represents all the values of a single floating point measurement.
// *PerfTrace implements Trace.
type PerfTrace struct {
« no previous file with comments | « no previous file | perf/go/types/types_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698