OLD | NEW |
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 | 4 |
5 from metrics import cpu | 5 from metrics import cpu |
6 from metrics import media | 6 from metrics import media |
7 from metrics import memory | 7 from metrics import memory |
8 from telemetry.page import page_measurement | 8 from telemetry.page import page_measurement |
9 | 9 |
10 | 10 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 # results. | 44 # results. |
45 self._memory_metric = memory.MemoryMetric(tab.browser) | 45 self._memory_metric = memory.MemoryMetric(tab.browser) |
46 | 46 |
47 def MeasurePage(self, page, tab, results): | 47 def MeasurePage(self, page, tab, results): |
48 """Measure the page's performance.""" | 48 """Measure the page's performance.""" |
49 self._media_metric.Stop(page, tab) | 49 self._media_metric.Stop(page, tab) |
50 trace_name = self._media_metric.AddResults(tab, results) | 50 trace_name = self._media_metric.AddResults(tab, results) |
51 if self._add_browser_metrics: | 51 if self._add_browser_metrics: |
52 self._cpu_metric.Stop(page, tab) | 52 self._cpu_metric.Stop(page, tab) |
53 self._cpu_metric.AddResults(tab, results, trace_name=trace_name) | 53 self._cpu_metric.AddResults(tab, results, trace_name=trace_name) |
54 self._memory_metric.AddSummaryResults(results, trace_name=trace_name) | 54 self._memory_metric.AddResults(results, trace_name=trace_name) |
OLD | NEW |