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

Unified Diff: tools/perf/metrics/smoothness.py

Issue 185953004: Add some statistics to the monsoon profile run (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Rebase and provide own statistics functions Created 6 years, 9 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/perf/metrics/smoothness.py
diff --git a/tools/perf/metrics/smoothness.py b/tools/perf/metrics/smoothness.py
index 4041900847f315f1e93df7bd235774371028c167..d638da917e3f2ed2250b8503b63671347404e407 100644
--- a/tools/perf/metrics/smoothness.py
+++ b/tools/perf/metrics/smoothness.py
@@ -4,10 +4,10 @@
from metrics import Metric
from metrics import rendering_stats
-from metrics import statistics
from telemetry.page import page_measurement
from telemetry.page.perf_tests_helper import FlattenList
from telemetry.core.timeline.model import TimelineModel
+from telemetry.util import statistics
TIMELINE_MARKER = 'Smoothness'
@@ -76,8 +76,7 @@ class SmoothnessMetric(Metric):
def AddResults(self, tab, results):
if self._stats.mouse_wheel_scroll_latency:
mean_mouse_wheel_scroll_latency = statistics.ArithmeticMean(
- self._stats.mouse_wheel_scroll_latency,
- len(self._stats.mouse_wheel_scroll_latency))
+ self._stats.mouse_wheel_scroll_latency)
mouse_wheel_scroll_latency_discrepancy = statistics.DurationsDiscrepancy(
self._stats.mouse_wheel_scroll_latency)
results.Add('mean_mouse_wheel_scroll_latency', 'ms',
@@ -87,8 +86,7 @@ class SmoothnessMetric(Metric):
if self._stats.touch_scroll_latency:
mean_touch_scroll_latency = statistics.ArithmeticMean(
- self._stats.touch_scroll_latency,
- len(self._stats.touch_scroll_latency))
+ self._stats.touch_scroll_latency)
touch_scroll_latency_discrepancy = statistics.DurationsDiscrepancy(
self._stats.touch_scroll_latency)
results.Add('mean_touch_scroll_latency', 'ms',
@@ -98,8 +96,7 @@ class SmoothnessMetric(Metric):
if self._stats.js_touch_scroll_latency:
mean_js_touch_scroll_latency = statistics.ArithmeticMean(
- self._stats.js_touch_scroll_latency,
- len(self._stats.js_touch_scroll_latency))
+ self._stats.js_touch_scroll_latency)
js_touch_scroll_latency_discrepancy = statistics.DurationsDiscrepancy(
self._stats.js_touch_scroll_latency)
results.Add('mean_js_touch_scroll_latency', 'ms',
@@ -112,8 +109,7 @@ class SmoothnessMetric(Metric):
results.Add('frame_times', 'ms', frame_times)
# Arithmetic mean of frame times.
- mean_frame_time = statistics.ArithmeticMean(frame_times,
- len(frame_times))
+ mean_frame_time = statistics.ArithmeticMean(frame_times)
results.Add('mean_frame_time', 'ms', round(mean_frame_time, 3))
# Absolute discrepancy of frame time stamps.

Powered by Google App Engine
This is Rietveld 408576698