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

Unified Diff: tools/telemetry/telemetry/results/progress_reporter.py

Issue 430383003: Have all --output-format produces progress report (in gtest-style). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 6 years, 5 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
Index: tools/telemetry/telemetry/results/progress_reporter.py
diff --git a/tools/telemetry/telemetry/timeline/empty_timeline_data_importer.py b/tools/telemetry/telemetry/results/progress_reporter.py
similarity index 23%
copy from tools/telemetry/telemetry/timeline/empty_timeline_data_importer.py
copy to tools/telemetry/telemetry/results/progress_reporter.py
index d400e5952188e450401a87a40eaf1207c7fbfd0c..50ee8d481bda05e87fecaedd8f90725a434493aa 100644
--- a/tools/telemetry/telemetry/timeline/empty_timeline_data_importer.py
+++ b/tools/telemetry/telemetry/results/progress_reporter.py
@@ -2,26 +2,29 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-from telemetry.timeline.timeline_data import TimelineData
-class EmptyTimelineDataImporter(object):
- """Imports empty TimlineData objects."""
- def __init__(self, model, timeline_data, import_priority=0):
+class ProgressReporter(object):
+ """A class that reports progress of a benchmark to the output stream.
+
+ The reporter produces output whenever a significant event happens
+ during the progress of a benchmark, including (but not limited to):
+ when a page run is started, when a page run finished, any failures
+ during a page run.
+
+ The default implementation outputs nothing.
+ """
+
+ def __init__(self, output_stream):
+ self.output_stream = output_stream
+
+ def WillRunPage(self, page):
+ pass
+
+ def DidAddValue(self, value):
pass
- @staticmethod
- def CanImport(timeline_data):
- if not isinstance(timeline_data, TimelineData):
- return False
- event_data = timeline_data.EventData()
- if isinstance(event_data, list):
- return len(event_data) == 0
- elif isinstance(event_data, basestring):
- return len(event_data) == 0
- return False
-
- def ImportEvents(self):
+ def DidAddSuccess(self, page):
pass
- def FinalizeImport(self):
+ def DidFinishAllTests(self, page_test_results):
pass
« no previous file with comments | « tools/telemetry/telemetry/results/page_test_results.py ('k') | tools/telemetry/telemetry/results/results_options.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698