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

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

Issue 2106133002: Port oortonline_tbm to TBMv2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix filter 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 | « no previous file | 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 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
6
5 import page_sets 7 import page_sets
6 8
7 from core import perf_benchmark 9 from core import perf_benchmark
8 from telemetry import benchmark 10 from telemetry import benchmark
9 from telemetry.page import legacy_page_test 11 from telemetry.page import legacy_page_test
10 from telemetry.value import scalar 12 from telemetry.value import scalar
11 from telemetry.value import improvement_direction 13 from telemetry.value import improvement_direction
12 from telemetry.timeline import chrome_trace_category_filter 14 from telemetry.timeline import chrome_trace_category_filter
13 from telemetry.web_perf import timeline_based_measurement 15 from telemetry.web_perf import timeline_based_measurement
14 from telemetry.web_perf.metrics import v8_gc_latency
15 from telemetry.web_perf.metrics import smoothness
16 from telemetry.web_perf.metrics import memory_timeline
17 16
18 17
19 class _OortOnlineMeasurement(legacy_page_test.LegacyPageTest): 18 class _OortOnlineMeasurement(legacy_page_test.LegacyPageTest):
20 19
21 def __init__(self): 20 def __init__(self):
22 super(_OortOnlineMeasurement, self).__init__() 21 super(_OortOnlineMeasurement, self).__init__()
23 22
24 def ValidateAndMeasurePage(self, page, tab, results): 23 def ValidateAndMeasurePage(self, page, tab, results):
25 del page # unused 24 del page # unused
26 tab.WaitForJavaScriptExpression('window.benchmarkFinished', 1000) 25 tab.WaitForJavaScriptExpression('window.benchmarkFinished', 1000)
(...skipping 19 matching lines...) Expand all
46 return 'oortonline' 45 return 'oortonline'
47 46
48 def CreateStorySet(self, options): 47 def CreateStorySet(self, options):
49 return page_sets.OortOnlinePageSet() 48 return page_sets.OortOnlinePageSet()
50 49
51 50
52 # Disabled on reference builds because they don't support the new 51 # Disabled on reference builds because they don't support the new
53 # Tracing.requestMemoryDump DevTools API. See http://crbug.com/540022. 52 # Tracing.requestMemoryDump DevTools API. See http://crbug.com/540022.
54 @benchmark.Disabled('reference') 53 @benchmark.Disabled('reference')
55 @benchmark.Disabled('android') 54 @benchmark.Disabled('android')
56 class OortOnlineTBM(perf_benchmark.PerfBenchmark): 55 class OortOnlineTBMv2(perf_benchmark.PerfBenchmark):
57 """OortOnline benchmark that measures WebGL and V8 performance. 56 """OortOnline benchmark that measures WebGL and V8 performance.
58 URL: http://oortonline.gl/#run 57 URL: http://oortonline.gl/#run
59 Info: http://v8project.blogspot.de/2015/10/jank-busters-part-one.html 58 Info: http://v8project.blogspot.de/2015/10/jank-busters-part-one.html
60 """ 59 """
61 60
61 # Report only V8-specific and overall renderer memory values. Note that
62 # detailed values reported by the OS (such as native heap) are excluded.
63 _V8_AND_OVERALL_MEMORY_RE = re.compile(
64 r'renderer_processes:'
65 r'(reported_by_chrome:v8|reported_by_os:system_memory:[^:]+$)')
66
67 page_set = page_sets.OortOnlineTBMPageSet
68
62 def SetExtraBrowserOptions(self, options): 69 def SetExtraBrowserOptions(self, options):
63 options.AppendExtraBrowserArgs([ 70 options.AppendExtraBrowserArgs([
64 # TODO(perezju): Temporary workaround to disable periodic memory dumps. 71 # TODO(perezju): Temporary workaround to disable periodic memory dumps.
65 # See: http://crbug.com/513692 72 # See: http://crbug.com/513692
66 '--enable-memory-benchmarking', 73 '--enable-memory-benchmarking',
67 ]) 74 ])
68 75
69 def CreateStorySet(self, options):
70 return page_sets.OortOnlineTBMPageSet()
71
72 def CreateTimelineBasedMeasurementOptions(self): 76 def CreateTimelineBasedMeasurementOptions(self):
73 v8_gc_latency_categories = [ 77 categories = [
74 'blink.console', 'renderer.scheduler', 'v8', 'webkit.console'] 78 # Implicitly disable all categories.
75 smoothness_categories = [ 79 '-*',
76 'webkit.console', 'blink.console', 'benchmark', 'trace_event_overhead'] 80 # V8.
77 categories = list(set(v8_gc_latency_categories + smoothness_categories)) 81 'blink.console',
78 memory_categories = 'blink.console,disabled-by-default-memory-infra' 82 'disabled-by-default-v8.gc',
83 'renderer.scheduler',
84 'v8',
85 'webkit.console',
86 # Smoothness.
87 'benchmark',
88 'blink',
89 'blink.console',
90 'trace_event_overhead',
91 'webkit.console',
92 # Memory.
93 'blink.console',
94 'disabled-by-default-memory-infra'
95 ]
79 category_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter( 96 category_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter(
80 memory_categories) 97 ','.join(categories))
81 for category in categories:
82 category_filter.AddIncludedCategory(category)
83 options = timeline_based_measurement.Options(category_filter) 98 options = timeline_based_measurement.Options(category_filter)
84 options.SetLegacyTimelineBasedMetrics([v8_gc_latency.V8GCLatency(), 99 options.SetTimelineBasedMetrics([
85 smoothness.SmoothnessMetric(), 100 'gcMetric', 'memoryMetric', 'responsivenessMetric'])
86 memory_timeline.MemoryTimelineMetric()])
87 return options 101 return options
88 102
89 @classmethod 103 @classmethod
90 def Name(cls): 104 def Name(cls):
91 return 'oortonline_tbm' 105 return 'oortonline_tbmv2'
92 106
93 @classmethod 107 @classmethod
94 def ValueCanBeAddedPredicate(cls, value, is_first_result): 108 def ValueCanBeAddedPredicate(cls, value, _):
95 if value.tir_label in ['Begin', 'End']: 109 if 'memory:chrome' in value.name:
96 return value.name.startswith('memory_') and 'v8_renderer' in value.name 110 return bool(cls._V8_AND_OVERALL_MEMORY_RE.search(value.name))
97 else: 111 if 'animation ' in value.name:
98 return value.tir_label == 'Running' 112 return 'throughput' in value.name or 'frameTimeDiscrepancy' in value.name
113 return 'v8' in value.name
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698