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

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

Issue 2257173003: [tools/perf] Add CodeAndMetadata metrics to v8_browsing benchmarks and add Ignition variants (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « gin/v8_isolate_memory_dump_provider.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 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 from benchmarks import v8_helper
7 from core import perf_benchmark 8 from core import perf_benchmark
8 from telemetry import benchmark 9 from telemetry import benchmark
9 from telemetry.timeline import chrome_trace_config 10 from telemetry.timeline import chrome_trace_config
10 from telemetry.timeline import chrome_trace_category_filter 11 from telemetry.timeline import chrome_trace_category_filter
11 from telemetry.web_perf import timeline_based_measurement 12 from telemetry.web_perf import timeline_based_measurement
12 import page_sets 13 import page_sets
13 14
14 15
15 # See tr.v.Numeric.getSummarizedScalarNumericsWithNames() 16 # See tr.v.Numeric.getSummarizedScalarNumericsWithNames()
16 # https://github.com/catapult-project/catapult/blob/master/tracing/tracing/value /numeric.html#L323 17 # https://github.com/catapult-project/catapult/blob/master/tracing/tracing/value /numeric.html#L323
(...skipping 23 matching lines...) Expand all
40 # Disable all categories by default. 41 # Disable all categories by default.
41 '-*', 42 '-*',
42 # Memory categories. 43 # Memory categories.
43 'disabled-by-default-memory-infra', 44 'disabled-by-default-memory-infra',
44 # V8 categories. 45 # V8 categories.
45 'blink.console', 46 'blink.console',
46 'disabled-by-default-v8.gc', 47 'disabled-by-default-v8.gc',
47 'renderer.scheduler', 48 'renderer.scheduler',
48 'v8', 49 'v8',
49 'webkit.console', 50 'webkit.console',
51 # TODO(crbug.com/616441, primiano): Remove this temporary workaround,
52 # which enables memory-infra V8 code stats in V8 code size benchmarks
53 # only (to not slow down detailed memory dumps in other benchmarks).
54 'disabled-by-default-memory-infra.v8.code_stats',
50 ] 55 ]
51 options = timeline_based_measurement.Options( 56 options = timeline_based_measurement.Options(
52 chrome_trace_category_filter.ChromeTraceCategoryFilter( 57 chrome_trace_category_filter.ChromeTraceCategoryFilter(
53 ','.join(categories))) 58 ','.join(categories)))
54 options.config.enable_android_graphics_memtrack = True 59 options.config.enable_android_graphics_memtrack = True
55 # Trigger periodic light memory dumps every 1000 ms. 60 # Trigger periodic light memory dumps every 1000 ms.
56 memory_dump_config = chrome_trace_config.MemoryDumpConfig() 61 memory_dump_config = chrome_trace_config.MemoryDumpConfig()
57 memory_dump_config.AddTrigger('light', 1000) 62 memory_dump_config.AddTrigger('light', 1000)
58 options.config.chrome_trace_config.SetMemoryDumpConfig(memory_dump_config) 63 options.config.chrome_trace_config.SetMemoryDumpConfig(memory_dump_config)
59 options.SetTimelineBasedMetrics(['v8AndMemoryMetrics']) 64 options.SetTimelineBasedMetrics(['v8AndMemoryMetrics'])
60 return options 65 return options
61 66
62 def CreateStorySet(self, options): 67 def CreateStorySet(self, options):
63 return page_sets.SystemHealthStorySet(platform=self.PLATFORM, case='browse') 68 return page_sets.SystemHealthStorySet(
69 platform=self.PLATFORM, case='browse')
petrcermak 2016/08/19 11:06:29 You don't need this line break ;-)
rmcilroy 2016/08/19 15:38:59 Done.
64 70
65 @classmethod 71 @classmethod
66 def Name(cls): 72 def Name(cls):
67 return 'v8.browsing_%s' % cls.PLATFORM 73 return 'v8.browsing_%s%s' % (cls.PLATFORM, cls.TEST_SUFFIX)
68 74
69 @classmethod 75 @classmethod
70 def ValueCanBeAddedPredicate(cls, value, is_first_result): 76 def ValueCanBeAddedPredicate(cls, value, is_first_result):
71 # TODO(crbug.com/610962): Remove this stopgap when the perf dashboard 77 # TODO(crbug.com/610962): Remove this stopgap when the perf dashboard
72 # is able to cope with the data load generated by TBMv2 metrics. 78 # is able to cope with the data load generated by TBMv2 metrics.
73 if 'memory:chrome' in value.name: 79 if 'memory:chrome' in value.name:
74 return ('renderer_processes' in value.name and 80 return ('renderer_processes' in value.name and
75 not _IGNORED_MEMORY_STATS_RE.search(value.name)) 81 not _IGNORED_MEMORY_STATS_RE.search(value.name))
76 return (_V8_GC_HIGH_LEVEL_STATS_RE.search(value.name) and 82 return (_V8_GC_HIGH_LEVEL_STATS_RE.search(value.name) and
77 not _IGNORED_V8_STATS_RE.search(value.name)) 83 not _IGNORED_V8_STATS_RE.search(value.name))
78 84
79 @classmethod 85 @classmethod
80 def ShouldTearDownStateAfterEachStoryRun(cls): 86 def ShouldTearDownStateAfterEachStoryRun(cls):
81 return True 87 return True
82 88
83 89
84 class V8DesktopBrowsingBenchmark(_V8BrowsingBenchmark): 90 class V8DesktopBrowsingBenchmark(_V8BrowsingBenchmark):
petrcermak 2016/08/19 11:06:29 You could remove some of the code duplication acro
rmcilroy 2016/08/19 15:38:59 Done.
85 PLATFORM = 'desktop' 91 PLATFORM = 'desktop'
92 TEST_SUFFIX = ''
86 93
87 @classmethod 94 @classmethod
88 def ShouldDisable(cls, possible_browser): 95 def ShouldDisable(cls, possible_browser):
89 # http://crbug.com/628736 96 # http://crbug.com/628736
90 if (possible_browser.platform.GetOSName() == 'mac' and 97 if (possible_browser.platform.GetOSName() == 'mac' and
91 possible_browser.browser_type == 'reference'): 98 possible_browser.browser_type == 'reference'):
92 return True 99 return True
93 100
94 return possible_browser.platform.GetDeviceTypeName() != 'Desktop' 101 return possible_browser.platform.GetDeviceTypeName() != 'Desktop'
95 102
petrcermak 2016/08/19 11:06:30 I ask you to add extra blank lines between top-lev
rmcilroy 2016/08/19 15:38:59 Done.
96 @benchmark.Disabled('reference') # http://crbug.com/628631 103 @benchmark.Disabled('reference') # http://crbug.com/628631
97 class V8MobileBrowsingBenchmark(_V8BrowsingBenchmark): 104 class V8MobileBrowsingBenchmark(_V8BrowsingBenchmark):
98 PLATFORM = 'mobile' 105 PLATFORM = 'mobile'
106 TEST_SUFFIX = ''
99 107
100 @classmethod 108 @classmethod
101 def ShouldDisable(cls, possible_browser): 109 def ShouldDisable(cls, possible_browser):
110 return possible_browser.platform.GetDeviceTypeName() == 'Desktop'
111
petrcermak 2016/08/19 11:06:29 nit: add blank line (there should be 2 blank lines
rmcilroy 2016/08/19 15:38:59 Done.
112 class V8DesktopIgnitionBrowsingBenchmark(_V8BrowsingBenchmark):
113 PLATFORM = 'desktop'
114 TEST_SUFFIX = '_ignition'
115
116 def SetExtraBrowserOptions(self, options):
117 super(V8DesktopIgnitionBrowsingBenchmark, self).SetExtraBrowserOptions(
118 options)
119 v8_helper.EnableIgnition(options)
120
121 @classmethod
122 def ShouldDisable(cls, possible_browser):
123 # http://crbug.com/628736
124 if (possible_browser.platform.GetOSName() == 'mac' and
125 possible_browser.browser_type == 'reference'):
126 return True
127
128 return possible_browser.platform.GetDeviceTypeName() != 'Desktop'
129
petrcermak 2016/08/19 11:06:29 nit: add blank line (ditto)
rmcilroy 2016/08/19 15:38:59 Done.
130 @benchmark.Disabled('reference') # http://crbug.com/628631
131 class V8MobileIgnitionBrowsingBenchmark(_V8BrowsingBenchmark):
132 PLATFORM = 'mobile'
133 TEST_SUFFIX = '_ignition'
134
135 def SetExtraBrowserOptions(self, options):
136 super(V8MobileIgnitionBrowsingBenchmark, self).SetExtraBrowserOptions(
137 options)
138 v8_helper.EnableIgnition(options)
139
140 @classmethod
141 def ShouldDisable(cls, possible_browser):
102 return possible_browser.platform.GetDeviceTypeName() == 'Desktop' 142 return possible_browser.platform.GetDeviceTypeName() == 'Desktop'
OLDNEW
« no previous file with comments | « gin/v8_isolate_memory_dump_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698