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

Unified Diff: tools/perf/measurements/smoothness_controller.py

Issue 382773006: Update smoothness_controller to use results.AddValue(...) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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: tools/perf/measurements/smoothness_controller.py
diff --git a/tools/perf/measurements/smoothness_controller.py b/tools/perf/measurements/smoothness_controller.py
index 3bcd285bf5a810ac0f41c3590e3e41a8ec670c84..51c2532d823fd25b13e25d5153f949b5e9ebc63c 100644
--- a/tools/perf/measurements/smoothness_controller.py
+++ b/tools/perf/measurements/smoothness_controller.py
@@ -7,6 +7,8 @@ from measurements import smooth_gesture_util
from telemetry.timeline.model import TimelineModel
from telemetry.page import page_measurement
from telemetry.page.actions import action_runner
+from telemetry.value import list_of_scalar_values
+from telemetry.value import scalar
from telemetry.web_perf import timeline_interaction_record as tir_module
from telemetry.web_perf.metrics import smoothness
@@ -95,7 +97,12 @@ class SmoothnessController(object):
for r in tab.browser.platform.GetRawDisplayFrameRateMeasurements():
if r.value is None:
raise MissingDisplayFrameRateError(r.name)
- results.Add(r.name, r.unit, r.value)
+ if isinstance(r.value, list):
+ results.AddValue(list_of_scalar_values.ListOfScalarValues(
+ results.current_page, r.name, r.unit, r.value))
+ else:
+ results.AddValue(scalar.ScalarValue(
+ results.current_page, r.name, r.unit, r.value))
def CleanUp(self, tab):
if tab.browser.platform.IsRawDisplayFrameRateSupported():
« 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