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

Side by Side Diff: tools/perf/benchmarks/oortonline.py

Issue 2458413002: Reland of [telemetry] Trace config should be used to disable periodic dumps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase. Created 4 years, 1 month 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/benchmarks/memory_infra.py ('k') | tools/perf/benchmarks/system_health.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 re 5 import re
6 6
7 import page_sets 7 import page_sets
8 8
9 from core import perf_benchmark 9 from core import perf_benchmark
10 from telemetry import benchmark 10 from telemetry import benchmark
11 from telemetry.page import legacy_page_test 11 from telemetry.page import legacy_page_test
12 from telemetry.value import scalar 12 from telemetry.value import scalar
13 from telemetry.value import improvement_direction 13 from telemetry.value import improvement_direction
14 from telemetry.timeline import chrome_trace_category_filter 14 from telemetry.timeline import chrome_trace_category_filter
15 from telemetry.timeline import chrome_trace_config
15 from telemetry.web_perf import timeline_based_measurement 16 from telemetry.web_perf import timeline_based_measurement
16 17
17 18
18 class _OortOnlineMeasurement(legacy_page_test.LegacyPageTest): 19 class _OortOnlineMeasurement(legacy_page_test.LegacyPageTest):
19 20
20 def __init__(self): 21 def __init__(self):
21 super(_OortOnlineMeasurement, self).__init__() 22 super(_OortOnlineMeasurement, self).__init__()
22 23
23 def ValidateAndMeasurePage(self, page, tab, results): 24 def ValidateAndMeasurePage(self, page, tab, results):
24 del page # unused 25 del page # unused
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 """ 57 """
57 58
58 # Report only V8-specific and overall renderer memory values. Note that 59 # Report only V8-specific and overall renderer memory values. Note that
59 # detailed values reported by the OS (such as native heap) are excluded. 60 # detailed values reported by the OS (such as native heap) are excluded.
60 _V8_AND_OVERALL_MEMORY_RE = re.compile( 61 _V8_AND_OVERALL_MEMORY_RE = re.compile(
61 r'renderer_processes:' 62 r'renderer_processes:'
62 r'(reported_by_chrome:v8|reported_by_os:system_memory:[^:]+$)') 63 r'(reported_by_chrome:v8|reported_by_os:system_memory:[^:]+$)')
63 64
64 page_set = page_sets.OortOnlineTBMPageSet 65 page_set = page_sets.OortOnlineTBMPageSet
65 66
66 def SetExtraBrowserOptions(self, options):
67 options.AppendExtraBrowserArgs([
68 # TODO(perezju): Temporary workaround to disable periodic memory dumps.
69 # See: http://crbug.com/513692
70 '--enable-memory-benchmarking',
71 ])
72
73 def CreateTimelineBasedMeasurementOptions(self): 67 def CreateTimelineBasedMeasurementOptions(self):
74 categories = [ 68 categories = [
75 # Implicitly disable all categories. 69 # Implicitly disable all categories.
76 '-*', 70 '-*',
77 # V8. 71 # V8.
78 'blink.console', 72 'blink.console',
79 'disabled-by-default-v8.gc', 73 'disabled-by-default-v8.gc',
80 'renderer.scheduler', 74 'renderer.scheduler',
81 'v8', 75 'v8',
82 'webkit.console', 76 'webkit.console',
83 # Smoothness. 77 # Smoothness.
84 'benchmark', 78 'benchmark',
85 'blink', 79 'blink',
86 'blink.console', 80 'blink.console',
87 'trace_event_overhead', 81 'trace_event_overhead',
88 'webkit.console', 82 'webkit.console',
89 # Memory. 83 # Memory.
90 'blink.console', 84 'blink.console',
91 'disabled-by-default-memory-infra' 85 'disabled-by-default-memory-infra'
92 ] 86 ]
93 category_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter( 87 category_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter(
94 ','.join(categories)) 88 ','.join(categories))
95 options = timeline_based_measurement.Options(category_filter) 89 options = timeline_based_measurement.Options(category_filter)
96 options.SetTimelineBasedMetrics([ 90 options.SetTimelineBasedMetrics([
97 'gcMetric', 'memoryMetric', 'responsivenessMetric']) 91 'gcMetric', 'memoryMetric', 'responsivenessMetric'])
92 # Setting an empty memory dump config disables periodic dumps.
93 options.config.chrome_trace_config.SetMemoryDumpConfig(
94 chrome_trace_config.MemoryDumpConfig())
98 return options 95 return options
99 96
100 @classmethod 97 @classmethod
101 def Name(cls): 98 def Name(cls):
102 return 'oortonline_tbmv2' 99 return 'oortonline_tbmv2'
103 100
104 @classmethod 101 @classmethod
105 def ValueCanBeAddedPredicate(cls, value, _): 102 def ValueCanBeAddedPredicate(cls, value, _):
106 if 'memory:chrome' in value.name: 103 if 'memory:chrome' in value.name:
107 return bool(cls._V8_AND_OVERALL_MEMORY_RE.search(value.name)) 104 return bool(cls._V8_AND_OVERALL_MEMORY_RE.search(value.name))
108 if 'animation ' in value.name: 105 if 'animation ' in value.name:
109 return 'throughput' in value.name or 'frameTimeDiscrepancy' in value.name 106 return 'throughput' in value.name or 'frameTimeDiscrepancy' in value.name
110 return 'v8' in value.name 107 return 'v8' in value.name
OLDNEW
« no previous file with comments | « tools/perf/benchmarks/memory_infra.py ('k') | tools/perf/benchmarks/system_health.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698