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

Unified Diff: tools/telemetry/telemetry/internal/results/html_output_formatter.py

Issue 1309143006: [Telemetry] Update the ConfindenceInterval calculation in results.html to use (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address petrcermak's comment Created 5 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
Index: tools/telemetry/telemetry/internal/results/html_output_formatter.py
diff --git a/tools/telemetry/telemetry/internal/results/html_output_formatter.py b/tools/telemetry/telemetry/internal/results/html_output_formatter.py
index 24affc3e57a3658086219f79cf4fc1cdc09ffd86..3324f7e077e0ea1e33ed1412d48f89579a58a9aa 100644
--- a/tools/telemetry/telemetry/internal/results/html_output_formatter.py
+++ b/tools/telemetry/telemetry/internal/results/html_output_formatter.py
@@ -13,6 +13,7 @@ from telemetry.core import util
from telemetry.internal.results import chart_json_output_formatter
from telemetry.internal.results import output_formatter
from telemetry import value as value_module
+from telemetry.value import list_of_scalar_values
_TEMPLATE_HTML_PATH = os.path.join(
@@ -92,17 +93,20 @@ class HtmlOutputFormatter(output_formatter.OutputFormatter):
self._output_stream.truncate()
def _PrintPerfResult(self, measurement, trace, values, units,
- result_type='default'):
+ result_type='default', std=None):
metric_name = measurement
if trace != measurement:
metric_name += '.' + trace
self._result['tests'].setdefault(self._test_name, {})
self._result['tests'][self._test_name].setdefault('metrics', {})
- self._result['tests'][self._test_name]['metrics'][metric_name] = {
+ metric_data = {
'current': values,
'units': units,
'important': result_type == 'default'
}
+ if std is not None:
+ metric_data['std'] = std
+ self._result['tests'][self._test_name]['metrics'][metric_name] = metric_data
def _TranslateChartJson(self, chart_json_dict):
dummy_dict = dict()
@@ -127,8 +131,12 @@ class HtmlOutputFormatter(output_formatter.OutputFormatter):
if trace_name == 'summary':
trace_name = chart_name
+ std = None
+ if isinstance(value, list_of_scalar_values.ListOfScalarValues):
+ std = value.std
+
self._PrintPerfResult(chart_name, trace_name, perf_value,
- value.units, result_type)
+ value.units, result_type, std)
@property
def _test_name(self):

Powered by Google App Engine
This is Rietveld 408576698