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

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

Issue 816353008: [Telemetry] Explicitly define Name() method for all perf benchmarks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
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 from measurements import media 5 from measurements import media
6 import page_sets 6 import page_sets
7 from telemetry import benchmark 7 from telemetry import benchmark
8 from telemetry.page import page_test 8 from telemetry.page import page_test
9 from telemetry.value import list_of_scalar_values 9 from telemetry.value import list_of_scalar_values
10 from telemetry.value import scalar 10 from telemetry.value import scalar
(...skipping 21 matching lines...) Expand all
32 results.current_page, trace_name, units='ms', 32 results.current_page, trace_name, units='ms',
33 value=float(metrics[m]), important=True)) 33 value=float(metrics[m]), important=True))
34 34
35 35
36 @benchmark.Disabled('android') 36 @benchmark.Disabled('android')
37 class Media(benchmark.Benchmark): 37 class Media(benchmark.Benchmark):
38 """Obtains media metrics for key user scenarios.""" 38 """Obtains media metrics for key user scenarios."""
39 test = media.Media 39 test = media.Media
40 page_set = page_sets.ToughVideoCasesPageSet 40 page_set = page_sets.ToughVideoCasesPageSet
41 41
42 @classmethod
43 def Name(cls):
44 return 'media.tough_video_cases'
45
42 46
43 @benchmark.Disabled 47 @benchmark.Disabled
44 class MediaNetworkSimulation(benchmark.Benchmark): 48 class MediaNetworkSimulation(benchmark.Benchmark):
45 """Obtains media metrics under different network simulations.""" 49 """Obtains media metrics under different network simulations."""
46 test = media.Media 50 test = media.Media
47 page_set = page_sets.MediaCnsCasesPageSet 51 page_set = page_sets.MediaCnsCasesPageSet
48 52
53 @classmethod
54 def Name(cls):
55 return 'media.media_cns_cases'
56
49 57
50 @benchmark.Enabled('android') 58 @benchmark.Enabled('android')
51 @benchmark.Disabled('l', 'android-webview') # WebView: crbug.com/419689 59 @benchmark.Disabled('l', 'android-webview') # WebView: crbug.com/419689
52 class MediaAndroid(benchmark.Benchmark): 60 class MediaAndroid(benchmark.Benchmark):
53 """Obtains media metrics for key user scenarios on Android.""" 61 """Obtains media metrics for key user scenarios on Android."""
54 test = media.Media 62 test = media.Media
55 tag = 'android' 63 tag = 'android'
56 page_set = page_sets.ToughVideoCasesPageSet 64 page_set = page_sets.ToughVideoCasesPageSet
57 # Exclude is_4k and 50 fps media files (garden* & crowd*). 65 # Exclude is_4k and 50 fps media files (garden* & crowd*).
58 options = {'page_label_filter_exclude': 'is_4k,is_50fps'} 66 options = {'page_label_filter_exclude': 'is_4k,is_50fps'}
59 67
68 @classmethod
69 def Name(cls):
70 return 'media.android.tough_video_cases'
71
60 72
61 @benchmark.Enabled('chromeos') 73 @benchmark.Enabled('chromeos')
62 class MediaChromeOS4kOnly(benchmark.Benchmark): 74 class MediaChromeOS4kOnly(benchmark.Benchmark):
63 """Benchmark for media performance on ChromeOS using only is_4k test content. 75 """Benchmark for media performance on ChromeOS using only is_4k test content.
64 """ 76 """
65 test = media.Media 77 test = media.Media
66 tag = 'chromeOS4kOnly' 78 tag = 'chromeOS4kOnly'
67 page_set = page_sets.ToughVideoCasesPageSet 79 page_set = page_sets.ToughVideoCasesPageSet
68 options = { 80 options = {
69 'page_label_filter': 'is_4k', 81 'page_label_filter': 'is_4k',
70 # Exclude is_50fps test files: crbug/331816 82 # Exclude is_50fps test files: crbug/331816
71 'page_label_filter_exclude': 'is_50fps' 83 'page_label_filter_exclude': 'is_50fps'
72 } 84 }
73 85
86 @classmethod
87 def Name(cls):
88 return 'media.chromeOS4kOnly.tough_video_cases'
89
74 90
75 @benchmark.Enabled('chromeos') 91 @benchmark.Enabled('chromeos')
76 class MediaChromeOS(benchmark.Benchmark): 92 class MediaChromeOS(benchmark.Benchmark):
77 """Benchmark for media performance on all ChromeOS platforms. 93 """Benchmark for media performance on all ChromeOS platforms.
78 94
79 This benchmark does not run is_4k content, there's a separate benchmark for 95 This benchmark does not run is_4k content, there's a separate benchmark for
80 that. 96 that.
81 """ 97 """
82 test = media.Media 98 test = media.Media
83 tag = 'chromeOS' 99 tag = 'chromeOS'
84 page_set = page_sets.ToughVideoCasesPageSet 100 page_set = page_sets.ToughVideoCasesPageSet
85 # Exclude is_50fps test files: crbug/331816 101 # Exclude is_50fps test files: crbug/331816
86 options = {'page_label_filter_exclude': 'is_4k,is_50fps'} 102 options = {'page_label_filter_exclude': 'is_4k,is_50fps'}
87 103
104 @classmethod
105 def Name(cls):
106 return 'media.chromeOS.tough_video_cases'
107
88 108
89 @benchmark.Disabled('android-webview') # crbug.com/419689 109 @benchmark.Disabled('android-webview') # crbug.com/419689
90 class MediaSourceExtensions(benchmark.Benchmark): 110 class MediaSourceExtensions(benchmark.Benchmark):
91 """Obtains media metrics for key media source extensions functions.""" 111 """Obtains media metrics for key media source extensions functions."""
92 test = _MSEMeasurement 112 test = _MSEMeasurement
93 page_set = page_sets.MseCasesPageSet 113 page_set = page_sets.MseCasesPageSet
94 114
115 @classmethod
116 def Name(cls):
117 return 'media.mse_cases'
118
95 def CustomizeBrowserOptions(self, options): 119 def CustomizeBrowserOptions(self, options):
96 # Needed to allow XHR requests to return stream objects. 120 # Needed to allow XHR requests to return stream objects.
97 options.AppendExtraBrowserArgs( 121 options.AppendExtraBrowserArgs(
98 ['--enable-experimental-web-platform-features', 122 ['--enable-experimental-web-platform-features',
99 '--disable-gesture-requirement-for-media-playback']) 123 '--disable-gesture-requirement-for-media-playback'])
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698