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

Side by Side Diff: tools/perf/measurements/oilpan_gc_times.py

Issue 1917393002: [tools/perf] Reference legacy_page_test module instead of page_test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « tools/perf/measurements/no_op.py ('k') | tools/perf/measurements/page_cycler.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 import os 5 import os
6 6
7 from telemetry.page import page_test 7 from telemetry.page import legacy_page_test
8 from telemetry.timeline.model import TimelineModel 8 from telemetry.timeline.model import TimelineModel
9 from telemetry.timeline import tracing_config 9 from telemetry.timeline import tracing_config
10 from telemetry.value import list_of_scalar_values 10 from telemetry.value import list_of_scalar_values
11 from telemetry.value import scalar 11 from telemetry.value import scalar
12 12
13 13
14 _CR_RENDERER_MAIN = 'CrRendererMain' 14 _CR_RENDERER_MAIN = 'CrRendererMain'
15 _RUN_SMOOTH_ACTIONS = 'RunSmoothAllActions' 15 _RUN_SMOOTH_ACTIONS = 'RunSmoothAllActions'
16 16
17 17
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 total_sweep_time += sweep_time 122 total_sweep_time += sweep_time
123 results.AddValue( 123 results.AddValue(
124 scalar.ScalarValue(page, 'oilpan_sweep', unit, total_sweep_time)) 124 scalar.ScalarValue(page, 'oilpan_sweep', unit, total_sweep_time))
125 125
126 gc_time = 0 126 gc_time = 0
127 for key in values: 127 for key in values:
128 gc_time += sum(values[key]) 128 gc_time += sum(values[key])
129 results.AddValue(scalar.ScalarValue(page, 'oilpan_gc', unit, gc_time)) 129 results.AddValue(scalar.ScalarValue(page, 'oilpan_gc', unit, gc_time))
130 130
131 131
132 class _OilpanGCTimesBase(page_test.PageTest): 132 class _OilpanGCTimesBase(legacy_page_test.LegacyPageTest):
133 133
134 def __init__(self, action_name=''): 134 def __init__(self, action_name=''):
135 super(_OilpanGCTimesBase, self).__init__(action_name) 135 super(_OilpanGCTimesBase, self).__init__(action_name)
136 136
137 def WillNavigateToPage(self, page, tab): 137 def WillNavigateToPage(self, page, tab):
138 # FIXME: Remove webkit.console when blink.console lands in chromium and 138 # FIXME: Remove webkit.console when blink.console lands in chromium and
139 # the ref builds are updated. crbug.com/386847 139 # the ref builds are updated. crbug.com/386847
140 config = tracing_config.TracingConfig() 140 config = tracing_config.TracingConfig()
141 for c in ['webkit.console', 'blink.console', 'blink_gc']: 141 for c in ['webkit.console', 'blink.console', 'blink_gc']:
142 config.tracing_category_filter.AddIncludedCategory(c) 142 config.tracing_category_filter.AddIncludedCategory(c)
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 194
195 def __init__(self): 195 def __init__(self):
196 super(OilpanGCTimesForInternals, self).__init__() 196 super(OilpanGCTimesForInternals, self).__init__()
197 197
198 @classmethod 198 @classmethod
199 def CustomizeBrowserOptions(cls, options): 199 def CustomizeBrowserOptions(cls, options):
200 # 'expose-internals-for-testing' can be enabled on content shell. 200 # 'expose-internals-for-testing' can be enabled on content shell.
201 assert 'content-shell' in options.browser_type 201 assert 'content-shell' in options.browser_type
202 options.AppendExtraBrowserArgs(['--expose-internals-for-testing', 202 options.AppendExtraBrowserArgs(['--expose-internals-for-testing',
203 '--js-flags=--expose-gc']) 203 '--js-flags=--expose-gc'])
OLDNEW
« no previous file with comments | « tools/perf/measurements/no_op.py ('k') | tools/perf/measurements/page_cycler.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698