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

Unified Diff: tools/perf/measurements/loading_trace.py

Issue 199733007: Remove start & stop logic from timeline_metric. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/perf/measurements/thread_times.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/measurements/loading_trace.py
diff --git a/tools/perf/measurements/loading_trace.py b/tools/perf/measurements/loading_trace.py
index 54af934a32b42da2c2c997b6af26aa47e245b6ec..263c73ef3f4aeaaf480c5397923141014c3f0686 100644
--- a/tools/perf/measurements/loading_trace.py
+++ b/tools/perf/measurements/loading_trace.py
@@ -1,6 +1,7 @@
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+from measurements import timeline_controller
from metrics import loading
from metrics import timeline
from telemetry.page import page_measurement
@@ -8,14 +9,14 @@ from telemetry.page import page_measurement
class LoadingTrace(page_measurement.PageMeasurement):
def __init__(self, *args, **kwargs):
super(LoadingTrace, self).__init__(*args, **kwargs)
- self._timeline_metric = timeline.LoadTimesTimelineMetric()
+ self._timeline_controller = timeline_controller.TimelineController()
@property
def results_are_the_same_on_every_page(self):
return False
def WillNavigateToPage(self, page, tab):
- self._timeline_metric.Start(page, tab)
+ self._timeline_controller.Start(page, tab)
def MeasurePage(self, page, tab, results):
# In current telemetry tests, all tests wait for DocumentComplete state,
@@ -24,7 +25,11 @@ class LoadingTrace(page_measurement.PageMeasurement):
# TODO(nduca): when crbug.com/168431 is fixed, modify the page sets to
# recognize loading as a toplevel action.
- self._timeline_metric.Stop(page, tab)
+ self._timeline_controller.Stop(tab)
loading.LoadingMetric().AddResults(tab, results)
- self._timeline_metric.AddResults(tab, results)
+ timeline_metric = timeline.TimelineMetric(
+ self._timeline_controller.model,
+ self._timeline_controller.renderer_process,
+ self._timeline_controller.action_ranges)
+ timeline_metric.AddResults(tab, results)
« no previous file with comments | « no previous file | tools/perf/measurements/thread_times.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698