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

Side by Side Diff: tools/telemetry/telemetry/web_perf/timeline_based_measurement_unittest.py

Issue 663023005: [Telemetry] Add file handle & trace value. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ready to land ^^ Created 6 years, 1 month 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
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 4
5 import os 5 import os
6 import unittest 6 import unittest
7 7
8 from telemetry import benchmark 8 from telemetry import benchmark
9 from telemetry.core import platform 9 from telemetry.core import platform
10 from telemetry.core import wpr_modes 10 from telemetry.core import wpr_modes
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 'SlowThreadJsRun-fast-duration', 234 'SlowThreadJsRun-fast-duration',
235 'SlowThreadJsRun-fast-idle_time', 235 'SlowThreadJsRun-fast-idle_time',
236 'SlowThreadJsRun-fast-incremental_marking', 236 'SlowThreadJsRun-fast-incremental_marking',
237 'SlowThreadJsRun-fast-incremental_marking_outside_idle', 237 'SlowThreadJsRun-fast-incremental_marking_outside_idle',
238 'SlowThreadJsRun-fast-mark_compactor', 238 'SlowThreadJsRun-fast-mark_compactor',
239 'SlowThreadJsRun-fast-mark_compactor_outside_idle', 239 'SlowThreadJsRun-fast-mark_compactor_outside_idle',
240 'SlowThreadJsRun-fast-scavenger', 240 'SlowThreadJsRun-fast-scavenger',
241 'SlowThreadJsRun-fast-scavenger_outside_idle', 241 'SlowThreadJsRun-fast-scavenger_outside_idle',
242 'SlowThreadJsRun-fast-total_garbage_collection', 242 'SlowThreadJsRun-fast-total_garbage_collection',
243 'SlowThreadJsRun-fast-total_garbage_collection_outside_idle', 243 'SlowThreadJsRun-fast-total_garbage_collection_outside_idle',
244 'trace',
244 ]) 245 ])
245 if platform.GetHostPlatform().GetOSName() != 'win': 246 if platform.GetHostPlatform().GetOSName() != 'win':
246 # CPU metric is only supported non-Windows platforms. 247 # CPU metric is only supported non-Windows platforms.
247 expected_names.add('SlowThreadJsRun-fast-cpu_time') 248 expected_names.add('SlowThreadJsRun-fast-cpu_time')
248 self.assertEquals( 249 self.assertEquals(
249 expected_names, set(v.name for v in results.all_page_specific_values)) 250 expected_names, set(v.name for v in results.all_page_specific_values))
250 251
251 # In interaction_enabled_page.html, the "slow" interaction executes 252 # In interaction_enabled_page.html, the "slow" interaction executes
252 # a loop with window.performance.now() to wait 200ms. 253 # a loop with window.performance.now() to wait 200ms.
253 # fast-duration measures wall time so its value should be at least 200ms. 254 # fast-duration measures wall time so its value should be at least 200ms.
(...skipping 17 matching lines...) Expand all
271 # Since window.performance.now() uses wall-time instead of thread time, 272 # Since window.performance.now() uses wall-time instead of thread time,
272 # we only assert the biggest jank > 50ms here to account for the fact 273 # we only assert the biggest jank > 50ms here to account for the fact
273 # that the browser may deschedule during the jank loop. 274 # that the browser may deschedule during the jank loop.
274 v = results.FindAllPageSpecificValuesNamed( 275 v = results.FindAllPageSpecificValuesNamed(
275 'JankThreadJSRun-responsive-biggest_jank_thread_time') 276 'JankThreadJSRun-responsive-biggest_jank_thread_time')
276 self.assertGreaterEqual(v[0].value, 50) 277 self.assertGreaterEqual(v[0].value, 50)
277 278
278 v = results.FindAllPageSpecificValuesNamed( 279 v = results.FindAllPageSpecificValuesNamed(
279 'JankThreadJSRun-responsive-total_big_jank_thread_time') 280 'JankThreadJSRun-responsive-total_big_jank_thread_time')
280 self.assertGreaterEqual(v[0].value, 50) 281 self.assertGreaterEqual(v[0].value, 50)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698