Chromium Code Reviews| Index: chrome/test/functional/perf.py |
| diff --git a/chrome/test/functional/perf.py b/chrome/test/functional/perf.py |
| index a9b5ca3c6566790fbf9e0e542776f9a13e7320ed..5f52ce2a13c991be8713ea683639a1211b7c62e0 100755 |
| --- a/chrome/test/functional/perf.py |
| +++ b/chrome/test/functional/perf.py |
| @@ -256,7 +256,7 @@ class BasePerfTest(pyauto.PyUITest): |
| return timer.timeit(number=1) * 1000 # Convert seconds to milliseconds. |
| def _OutputPerfForStandaloneGraphing(self, graph_name, description, value, |
| - units, units_x): |
| + units, units_x, is_stacked): |
| """Outputs perf measurement data to a local folder to be graphed. |
| This function only applies to Chrome desktop, and assumes that environment |
| @@ -280,6 +280,8 @@ class BasePerfTest(pyauto.PyUITest): |
| with the performance measurements, such as 'iteration' if the x values |
| are iteration numbers. If this argument is specified, then the |
| |value| argument must be a list of (x, y) tuples. |
| + is_stacked: True to draw a "stacked" graph. First-come values are |
| + stacked at bottom by default. |
| """ |
| revision_num_file = os.path.join(self._local_perf_dir, 'last_revision.dat') |
| if os.path.exists(revision_num_file): |
| @@ -346,6 +348,13 @@ class BasePerfTest(pyauto.PyUITest): |
| 'traces': { description: [str(value), str(0.0)] } |
| } |
| + if is_stacked: |
| + new_line['stacked'] = True |
| + if 'default_stacking_order' not in new_line: |
|
dennis_jeffrey
2012/09/05 17:34:12
should we change the name to something shorter lik
Dai Mikurube (NOT FULLTIME)
2012/09/06 05:30:10
Renamed:
'stacked' => 'stack'
'default_stacking_or
|
| + new_line['default_stacking_order'] = [] |
| + if description not in new_line['default_stacking_order']: |
| + new_line['default_stacking_order'].append(description) |
| + |
| if seen_key in self._seen_graph_lines: |
| # Update results for the most recent revision. |
| existing_lines[0] = new_line |
| @@ -363,7 +372,7 @@ class BasePerfTest(pyauto.PyUITest): |
| f.write(str(revision)) |
| def _OutputPerfGraphValue(self, description, value, units, |
|
dennis_jeffrey
2012/09/05 17:34:12
Note: there are actually 2 ways in which perf resu
Dai Mikurube (NOT FULLTIME)
2012/09/06 05:30:10
Thanks for your effort to commit the "RESULT" pars
cmp_google
2012/09/14 04:32:36
Dennis and Dai, please let me know if/when there's
Dai Mikurube (NOT FULLTIME)
2012/09/14 10:19:07
Ah, ok, I'll Cc: you for such changes!
dennis_jeffrey
2012/09/14 16:33:31
Yes, actually I was planning to make you our main
|
| - graph_name, units_x=None): |
| + graph_name, units_x=None, is_stacked=False): |
| """Outputs a performance value to have it graphed on the performance bots. |
| The output format differs, depending on whether the current platform is |
| @@ -394,6 +403,8 @@ class BasePerfTest(pyauto.PyUITest): |
| with the performance measurements, such as 'iteration' if the x values |
| are iteration numbers. If this argument is specified, then the |
| |value| argument must be a list of (x, y) tuples. |
| + is_stacked: True to draw a "stacked" graph. First-come values are |
| + stacked at bottom by default. |
| """ |
| if (isinstance(value, list) and value[0] is not None and |
| isinstance(value[0], tuple)): |
| @@ -433,7 +444,7 @@ class BasePerfTest(pyauto.PyUITest): |
| if self._local_perf_dir: |
| self._OutputPerfForStandaloneGraphing( |
| - graph_name, description, value, units, units_x) |
| + graph_name, description, value, units, units_x, is_stacked) |
| def _OutputEventForStandaloneGraphing(self, description, event_list): |
| """Outputs event information to a local folder to be graphed. |