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

Side by Side Diff: tools/telemetry/telemetry/internal/results/output_formatter.py

Issue 1647513002: Delete tools/telemetry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5
6 class OutputFormatter(object):
7 """A formatter for PageTestResults.
8
9 An OutputFormatter takes PageTestResults, formats the results
10 (telemetry.value.Value instances), and output the formatted results
11 in the given output stream.
12
13 Examples of output formatter: CsvOutputFormatter produces results in
14 CSV format."""
15
16 def __init__(self, output_stream):
17 """Constructs a new formatter that writes to the output_stream.
18
19 Args:
20 output_stream: The stream to write the formatted output to.
21 """
22 self._output_stream = output_stream
23
24 def Format(self, page_test_results):
25 """Formats the given PageTestResults into the output stream.
26
27 This will be called once at the end of a benchmark.
28
29 Args:
30 page_test_results: A PageTestResults object containing all results
31 from the current benchmark run.
32 """
33 raise NotImplementedError()
34
35 @property
36 def output_stream(self):
37 return self._output_stream
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698