| 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
|
|
|