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

Side by Side Diff: tools/perf/metrics/smoothness_unittest.py

Issue 23072018: [telemetry] Move telemetry/core/chrome/ to telemetry/core/backends/chrome/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix perf smoothness_unittest. Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/backends/adb_commands.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 import unittest 4 import unittest
5 import random 5 import random
6 6
7 from metrics import smoothness 7 from metrics import smoothness
8 from metrics.gpu_rendering_stats import GpuRenderingStats 8 from metrics.gpu_rendering_stats import GpuRenderingStats
9 from telemetry.page import page 9 from telemetry.page import page
10 from telemetry.page.page_measurement_results import PageMeasurementResults 10 from telemetry.page.page_measurement_results import PageMeasurementResults
11 from telemetry.core.chrome.tracing_backend import RawTraceResultImpl 11 from telemetry.core.backends.chrome.tracing_backend import RawTraceResultImpl
12 from telemetry.core.chrome.trace_result import TraceResult 12 from telemetry.core.backends.chrome.trace_result import TraceResult
13 13
14 class MockTimer(object): 14 class MockTimer(object):
15 """ An instance of this class is used as a global timer to generate 15 """ An instance of this class is used as a global timer to generate
16 random durations for stats and consistent timestamps for all mock trace 16 random durations for stats and consistent timestamps for all mock trace
17 events. 17 events.
18 """ 18 """
19 def __init__(self): 19 def __init__(self):
20 self.microseconds = 0 20 self.microseconds = 0
21 21
22 def Advance(self, low = 0, high = 100000): 22 def Advance(self, low = 0, high = 100000):
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 self.assertAlmostEquals( 299 self.assertAlmostEquals(
300 round(rs['totalTouchUILatency'] / rs['touchUICount'] * 1000.0, 3), 300 round(rs['totalTouchUILatency'] / rs['touchUICount'] * 1000.0, 3),
301 res.page_results[0]['average_touch_ui_latency'].value) 301 res.page_results[0]['average_touch_ui_latency'].value)
302 self.assertAlmostEquals( 302 self.assertAlmostEquals(
303 round(rs['totalTouchAckedLatency'] / rs['touchAckedCount'] * 1000.0, 3), 303 round(rs['totalTouchAckedLatency'] / rs['touchAckedCount'] * 1000.0, 3),
304 res.page_results[0]['average_touch_acked_latency'].value) 304 res.page_results[0]['average_touch_acked_latency'].value)
305 self.assertAlmostEquals( 305 self.assertAlmostEquals(
306 round(rs['totalScrollUpdateLatency'] / rs['scrollUpdateCount'] * 1000.0, 306 round(rs['totalScrollUpdateLatency'] / rs['scrollUpdateCount'] * 1000.0,
307 3), 307 3),
308 res.page_results[0]['average_scroll_update_latency'].value) 308 res.page_results[0]['average_scroll_update_latency'].value)
OLDNEW
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/backends/adb_commands.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698