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

Unified Diff: content/test/gpu/gpu_tests/memory.py

Issue 471763003: Remove deprecated methods related to tracing in browser.py. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | tools/perf/measurements/image_decoding.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/gpu/gpu_tests/memory.py
diff --git a/content/test/gpu/gpu_tests/memory.py b/content/test/gpu/gpu_tests/memory.py
index dbb111f9ebbd57e46a2eb08725cdabcd26791974..c8eadc426c25257d8e0153dea2f6e44297906c5a 100644
--- a/content/test/gpu/gpu_tests/memory.py
+++ b/content/test/gpu/gpu_tests/memory.py
@@ -6,6 +6,8 @@ import page_sets
from telemetry import benchmark
from telemetry.page import page_test
+from telemetry.core.platform import tracing_category_filter
+from telemetry.core.platform import tracing_options
from telemetry.timeline import counter
from telemetry.timeline import model
@@ -64,7 +66,7 @@ test_harness_script = r"""
class _MemoryValidator(page_test.PageTest):
def ValidateAndMeasurePage(self, page, tab, results):
- timeline_data = tab.browser.StopTracing()
+ timeline_data = tab.browser.platform.tracing_controller.Stop()
timeline_model = model.TimelineModel(timeline_data)
for process in timeline_model.GetAllProcesses():
if 'gpu.GpuMemoryUsage' in process.counters:
@@ -86,7 +88,12 @@ class _MemoryValidator(page_test.PageTest):
# FIXME: Remove webkit.console when blink.console lands in chromium and the
# ref builds are updated. crbug.com/386847
custom_categories = ['webkit.console', 'blink.console', 'gpu']
- tab.browser.StartTracing(','.join(custom_categories), 60)
+ category_filter = tracing_category_filter.TracingCategoryFilter()
+ for c in custom_categories:
+ category_filter.AddIncludedCategory(c)
+ options = tracing_options.TracingOptions()
+ options.enable_chrome_trace = True
+ tab.browser.platform.tracing_controller.Start(options, category_filter, 60)
def _FormatException(self, low_or_high, mb_used):
return 'Memory allocation too %s (was %d MB, should be %d MB +/- %d MB)' % (
« no previous file with comments | « no previous file | tools/perf/measurements/image_decoding.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698