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

Unified Diff: chrome/test/functional/perf.py

Issue 10870039: Allow multiple performance values in _OutputPerfForStandaloneGraphing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed the comments. Created 8 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/functional/perf.py
diff --git a/chrome/test/functional/perf.py b/chrome/test/functional/perf.py
index a0eda573b4f9b0ac14f459d23537167dfb60ba72..9c03c5008aa116ee7bab14c4734ed707a97fc1ff 100755
--- a/chrome/test/functional/perf.py
+++ b/chrome/test/functional/perf.py
@@ -324,29 +324,28 @@ class BasePerfTest(pyauto.PyUITest):
existing_lines = f.readlines()
existing_lines = map(eval, map(lambda x: x.strip(), existing_lines))
- seen_key = graph_name + '|' + description
+ seen_key = graph_name
+ # We assume that the first line |existing_lines[0]| is the latest.
if units_x:
- points = []
+ new_line = {
+ 'rev': revision,
+ 'traces': { description: [] }
+ }
if seen_key in self._seen_graph_lines:
# We've added points previously for this graph line in the current
# test execution, so retrieve the original set of points specified in
# the most recent revision in the data file.
- points = existing_lines[0]['traces'][description]
+ new_line = existing_lines[0]
+ if not description in new_line['traces']:
+ new_line['traces'][description] = []
for x_value, y_value in value:
- points.append([str(x_value), str(y_value)])
- new_traces = {
- description: points
- }
+ new_line['traces'][description].append([str(x_value), str(y_value)])
else:
- new_traces = {
- description: [str(value), str(0.0)]
+ new_line = {
+ 'rev': revision,
+ 'traces': { description: [str(value), str(0.0)] }
}
- new_line = {
- 'rev': revision,
- 'traces': new_traces
- }
-
if seen_key in self._seen_graph_lines:
# Update results for the most recent revision.
existing_lines[0] = new_line
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698