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

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

Issue 414253004: Introduce TracingController and TracingControllerBackend skeleton (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ready_to_land Created 6 years, 4 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
Index: tools/perf/measurements/timeline_controller.py
diff --git a/tools/perf/measurements/timeline_controller.py b/tools/perf/measurements/timeline_controller.py
index 4cd0008b27de9fea89ba7ebe66f8e1593da1855e..27a1ac63cdc4d02db99ac263dbb031f2bc1d04b9 100644
--- a/tools/perf/measurements/timeline_controller.py
+++ b/tools/perf/measurements/timeline_controller.py
@@ -3,7 +3,7 @@
# found in the LICENSE file.
from measurements import smooth_gesture_util
-from telemetry.core.backends.chrome import tracing_backend
+from telemetry.core.platform import tracing_category_filter
from telemetry.timeline.model import TimelineModel
from telemetry.page.actions import action_runner
from telemetry.web_perf import timeline_interaction_record as tir_module
@@ -15,7 +15,7 @@ RUN_SMOOTH_ACTIONS = 'RunSmoothAllActions'
class TimelineController(object):
def __init__(self):
super(TimelineController, self).__init__()
- self.trace_categories = tracing_backend.DEFAULT_TRACE_CATEGORIES
+ self.trace_categories = None
self._model = None
self._renderer_process = None
self._smooth_records = []
@@ -30,12 +30,11 @@ class TimelineController(object):
self._renderer_process = None
if not tab.browser.supports_tracing:
raise Exception('Not supported')
- if self.trace_categories:
- categories = [self.trace_categories] + \
- page.GetSyntheticDelayCategories()
- else:
- categories = page.GetSyntheticDelayCategories()
- tab.browser.StartTracing(','.join(categories))
+ category_filter = tracing_category_filter.TracingCategoryFilter(
+ filter_string=self.trace_categories)
+ for delay in page.GetSyntheticDelayCategories():
+ category_filter.AddSyntheticDelay(delay)
+ tab.browser.StartTracing(category_filter)
def Start(self, tab):
# Start the smooth marker for all actions.
« no previous file with comments | « tools/perf/measurements/thread_times.py ('k') | tools/telemetry/telemetry/core/backends/chrome/tracing_backend.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698