Chromium Code Reviews| Index: chrome/test/functional/perf.py |
| diff --git a/chrome/test/functional/perf.py b/chrome/test/functional/perf.py |
| index f4cbe4afff6177961b781e7ddeaf62f8bc7a6cfa..815fc490d75773b0c347de6e4c0782343696f5cc 100755 |
| --- a/chrome/test/functional/perf.py |
| +++ b/chrome/test/functional/perf.py |
| @@ -324,29 +324,29 @@ 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_line[0]| is the latest. |
|
dennis_jeffrey
2012/08/29 18:47:51
nit: existing_line --> existing_lines
Dai Mikurube (NOT FULLTIME)
2012/08/30 02:24:11
Done.
|
| + # We update only the first line. |
|
dennis_jeffrey
2012/08/29 18:47:51
I recommend removing this line. There's a case wh
Dai Mikurube (NOT FULLTIME)
2012/08/30 02:24:11
Removed. To write it correctly, "We insert a new
dennis_jeffrey
2012/08/30 17:13:23
Yes, I believe that would be a more accurate state
|
| 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: |
|
dennis_jeffrey
2012/08/29 18:47:51
FYI: The reason for "seen_key" and "self._seen_gra
Dai Mikurube (NOT FULLTIME)
2012/08/30 02:24:11
Thanks for the description. Hmm, my question is:
dennis_jeffrey
2012/08/30 17:13:23
I am not totally clear on exactly what you mean, b
Dai Mikurube (NOT FULLTIME)
2012/09/04 04:32:58
Ok, I'll try it when I have time. Thanks. :)
|
| # Update results for the most recent revision. |
| existing_lines[0] = new_line |