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

Side by Side Diff: chrome/test/media_router/telemetry/benchmarks/media_router_measurements.py

Issue 1843063004: Add new Telemetry tests to get CPU and memory usage for idle and flinging two test scenarios. Mirro… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor update for the function docs Created 4 years, 8 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
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 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 from benchmarks import media_router_metric 5 from benchmarks import media_router_dialog_metric
6 from benchmarks import media_router_cpu_memory_metric
6 from telemetry.page import page_test 7 from telemetry.page import page_test
7 8
8 9
9 class MediaRouterPageTest(page_test.PageTest): 10 class MediaRouterDialogTest(page_test.PageTest):
10 """Performs a measurement of Media Route dialog latency.""" 11 """Performs a measurement of Media Route dialog latency."""
11 12
12 def __init__(self): 13 def __init__(self):
13 super(MediaRouterPageTest, self).__init__() 14 super(MediaRouterDialogTest, self).__init__()
14 self._media_router_metric = media_router_metric.MediaRouterMetric() 15 self._metric = media_router_dialog_metric.MediaRouterDialogMetric()
15 16
16 def DidNavigateToPage(self, page, tab): 17 def DidNavigateToPage(self, page, tab):
17 self._media_router_metric.Start(page, tab) 18 self._metric.Start(page, tab)
18 19
19 def ValidateAndMeasurePage(self, page, tab, results): 20 def ValidateAndMeasurePage(self, page, tab, results):
20 self._media_router_metric.Stop(page, tab) 21 self._metric.Stop(page, tab)
21 self._media_router_metric.AddResults(tab, results) 22 self._metric.AddResults(tab, results)
23
24
25 class MediaRouterCPUMemoryTest(page_test.PageTest):
26 """Performs a measurement of Media Route CPU/memory usage."""
27
28 def __init__(self):
29 super(MediaRouterCPUMemoryTest, self).__init__()
30 self._metric = media_router_cpu_memory_metric.MediaRouterCPUMemoryMetric()
31
32 def ValidateAndMeasurePage(self, page, tab, results):
33 self._metric.AddResults(tab, results)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698