Chromium Code Reviews| 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. |