summaryrefslogtreecommitdiffstats
path: root/content/test
diff options
context:
space:
mode:
authorrnephew <rnephew@chromium.org>2015-12-21 15:08:48 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-21 23:10:14 +0000
commitb1d5cc2a48d694b5b416a0fd905862b1d11b7e2b (patch)
treed6a83c3958d347f7bcfea7f53ee5577d30403764 /content/test
parent865e61ded0520753e5b2a95ef5b5ec9032c866d0 (diff)
downloadchromium_src-b1d5cc2a48d694b5b416a0fd905862b1d11b7e2b.zip
chromium_src-b1d5cc2a48d694b5b416a0fd905862b1d11b7e2b.tar.gz
chromium_src-b1d5cc2a48d694b5b416a0fd905862b1d11b7e2b.tar.bz2
[Telemetry] moving tracing options/category filters
to tracing config Currently they are using options and category filter as 2 seperate things being passed. This changes it to use Tracing Config, which has both of those. There will be a follow-up CL that gets rid of tracing_options completely. BUG=570489 TBR=dtu@chromium.org CQ_EXTRA_TRYBOTS=tryserver.chromium.perf:linux_perf_bisect;tryserver.chromium.perf:mac_10_10_perf_bisect;tryserver.chromium.perf:win_perf_bisect Review URL: https://codereview.chromium.org/1538663005 Cr-Commit-Position: refs/heads/master@{#366486}
Diffstat (limited to 'content/test')
-rw-r--r--content/test/gpu/gpu_tests/memory_test.py15
-rw-r--r--content/test/gpu/gpu_tests/trace_test.py13
2 files changed, 12 insertions, 16 deletions
diff --git a/content/test/gpu/gpu_tests/memory_test.py b/content/test/gpu/gpu_tests/memory_test.py
index c06c722..c88ef09 100644
--- a/content/test/gpu/gpu_tests/memory_test.py
+++ b/content/test/gpu/gpu_tests/memory_test.py
@@ -7,8 +7,7 @@ import page_sets
from telemetry.page import page_test
from telemetry.timeline import model
-from telemetry.timeline import tracing_category_filter
-from telemetry.timeline import tracing_options
+from telemetry.timeline import tracing_config
MEMORY_LIMIT_MB = 192
SINGLE_TAB_LIMIT_MB = 192
@@ -86,13 +85,11 @@ class MemoryValidator(gpu_test_base.ValidatorBase):
def WillNavigateToPage(self, page, tab):
# 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']
- 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)
+ config = tracing_config.TracingConfig()
+ for c in ['webkit.console', 'blink.console', 'gpu']:
+ config.tracing_category_filter.AddIncludedCategory(c)
+ config.tracing_options.enable_chrome_trace = True
+ tab.browser.platform.tracing_controller.Start(config, 60)
def _FormatException(self, low_or_high, mb_used):
return 'Memory allocation too %s (was %d MB, should be %d MB +/- %d MB)' % (
diff --git a/content/test/gpu/gpu_tests/trace_test.py b/content/test/gpu/gpu_tests/trace_test.py
index 35b1192..2921b52 100644
--- a/content/test/gpu/gpu_tests/trace_test.py
+++ b/content/test/gpu/gpu_tests/trace_test.py
@@ -7,8 +7,7 @@ import page_sets
from telemetry.page import page_test
from telemetry.timeline import model as model_module
-from telemetry.timeline import tracing_category_filter
-from telemetry.timeline import tracing_options
+from telemetry.timeline import tracing_config
TOPLEVEL_GL_CATEGORY = 'gpu_toplevel'
TOPLEVEL_SERVICE_CATEGORY = 'disabled-by-default-gpu.service'
@@ -52,11 +51,11 @@ class TraceValidatorBase(gpu_test_base.ValidatorBase):
options.AppendExtraBrowserArgs('--enable-logging')
def WillNavigateToPage(self, page, tab):
- cat_string = ','.join(TOPLEVEL_CATEGORIES)
- cat_filter = tracing_category_filter.TracingCategoryFilter(cat_string)
- options = tracing_options.TracingOptions()
- options.enable_chrome_trace = True
- tab.browser.platform.tracing_controller.Start(options, cat_filter, 60)
+ config = tracing_config.TracingConfig()
+ for cat in TOPLEVEL_CATEGORIES:
+ config.tracing_category_filter.AddIncludedCategory(cat)
+ config.tracing_options.enable_chrome_trace = True
+ tab.browser.platform.tracing_controller.Start(config, 60)
def _FormatException(self, category):
return 'Trace markers for GPU category was not found: %s' % category