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

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

Issue 8342055: Added some comments and a warning message to pyauto perf tests in perf.py. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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 b23b9ee217e6eeed4ee7e9c2d03a4a403bd62f1a..8e572617775ebb5e94dac3972be34fc2e8364cf3 100644
--- a/chrome/test/functional/perf.py
+++ b/chrome/test/functional/perf.py
@@ -112,19 +112,33 @@ class BasePerfTest(pyauto.PyUITest):
def _OutputPerfGraphValue(self, description, value):
"""Outputs a performance value to have it graphed on the performance bots.
- Only used for ChromeOS.
+ Only used for ChromeOS. The performance bots have a 30-character limit on
+ the length of the description for a performance value. Any characters
+ beyond that are truncated before results are stored in the autotest
+ database.
Args:
- description: A string description of the performance value.
+ description: A string description of the performance value. This will
+ be truncated to 30 characters when stored in the autotest
+ database.
value: A numeric value representing a single performance measurement.
"""
if self.IsChromeOS():
+ if len(description) > 30:
+ logging.warning('The description "%s" will be truncated to "%s" '
+ '(length 30) when added to the autotest database.' %
truty 2011/10/20 00:12:01 Not a big deal, but I think it's preferred when ca
dennis_jeffrey 2011/10/20 01:18:21 Done (also changed in several other places in this
+ (description, description[:30]))
print '\n%s(\'%s\', %.2f)%s' % (self._PERF_OUTPUT_MARKER_PRE, description,
value, self._PERF_OUTPUT_MARKER_POST)
def _PrintSummaryResults(self, description, values, units):
"""Logs summary measurement information.
+ This function computes and outputs the average and standard deviation of
+ the specified list of value measurements. It also invokes
+ _OutputPerfGraphValue() with the computed *average* value, to ensure the
+ average value can be plotted in a performance graph.
+
Args:
description: A string description for the specified results.
values: A list of numeric value measurements.
« 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