| OLD | NEW |
| 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) |
| OLD | NEW |