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

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

Issue 10871038: Dump data for stacked graphs in Chrome Endure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: renamed Created 8 years, 3 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 | chrome/test/functional/perf_endure.py » ('j') | chrome/test/functional/perf_endure.py » ('J')
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 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.
« no previous file with comments | « no previous file | chrome/test/functional/perf_endure.py » ('j') | chrome/test/functional/perf_endure.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698