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

Unified Diff: tools/telemetry/telemetry/benchmark.py

Issue 938743002: [Telemetry] Add results filtering. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ready to land Created 5 years, 10 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 | tools/telemetry/telemetry/results/page_test_results.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/benchmark.py
diff --git a/tools/telemetry/telemetry/benchmark.py b/tools/telemetry/telemetry/benchmark.py
index 2ef5fa4b199071407f636ea92def62294e489b37..5723294fee38f020c1d7c398ce45488f285e52d4 100644
--- a/tools/telemetry/telemetry/benchmark.py
+++ b/tools/telemetry/telemetry/benchmark.py
@@ -138,6 +138,20 @@ class Benchmark(command_line.Command):
def ProcessCommandLineArgs(cls, parser, args):
pass
+ @classmethod
+ def ValueCanBeAddedPredicate(cls, value): # pylint: disable=unused-argument
+ """ Returns whether |value| can be added to the test results.
+ Override this method to customize the logic of adding values to test
+ results.
+
+ Args:
+ value: a value.Value instance.
+
+ Returns: a boolean. True if value should be added to the test results and
+ False otherwise.
+ """
+ return True
+
def CustomizeBrowserOptions(self, options):
"""Add browser options that are required by this benchmark."""
@@ -175,7 +189,8 @@ class Benchmark(command_line.Command):
self._DownloadGeneratedProfileArchive(finder_options)
benchmark_metadata = self.GetMetadata()
- results = results_options.CreateResults(benchmark_metadata, finder_options)
+ results = results_options.CreateResults(
+ benchmark_metadata, finder_options, self.ValueCanBeAddedPredicate)
try:
user_story_runner.Run(pt, us, expectations, finder_options, results,
max_failures=self._max_failures)
« no previous file with comments | « no previous file | tools/telemetry/telemetry/results/page_test_results.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698