OLD | NEW |
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_measurement | 8 from telemetry.page import page_measurement |
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 17 matching lines...) Expand all Loading... |
28 results.current_page, trace_name, units='ms', | 28 results.current_page, trace_name, units='ms', |
29 value=float(metrics[m]), important=True)) | 29 value=float(metrics[m]), important=True)) |
30 | 30 |
31 | 31 |
32 class Media(benchmark.Benchmark): | 32 class Media(benchmark.Benchmark): |
33 """Obtains media metrics for key user scenarios.""" | 33 """Obtains media metrics for key user scenarios.""" |
34 test = media.Media | 34 test = media.Media |
35 page_set = page_sets.ToughVideoCasesPageSet | 35 page_set = page_sets.ToughVideoCasesPageSet |
36 | 36 |
37 | 37 |
| 38 @benchmark.Disabled |
38 class MediaNetworkSimulation(benchmark.Benchmark): | 39 class MediaNetworkSimulation(benchmark.Benchmark): |
39 """Obtains media metrics under different network simulations.""" | 40 """Obtains media metrics under different network simulations.""" |
40 test = media.Media | 41 test = media.Media |
41 page_set = page_sets.MediaCnsCasesPageSet | 42 page_set = page_sets.MediaCnsCasesPageSet |
42 | 43 |
43 | 44 |
| 45 @benchmark.Enabled('android') |
44 class MediaAndroid(benchmark.Benchmark): | 46 class MediaAndroid(benchmark.Benchmark): |
45 """Obtains media metrics for key user scenarios on Android.""" | 47 """Obtains media metrics for key user scenarios on Android.""" |
46 test = media.Media | 48 test = media.Media |
47 tag = 'android' | 49 tag = 'android' |
48 page_set = page_sets.ToughVideoCasesPageSet | 50 page_set = page_sets.ToughVideoCasesPageSet |
49 # Exclude is_4k and 50 fps media files (garden* & crowd*). | 51 # Exclude is_4k and 50 fps media files (garden* & crowd*). |
50 options = {'page_label_filter_exclude': 'is_4k,is_50fps'} | 52 options = {'page_label_filter_exclude': 'is_4k,is_50fps'} |
51 | 53 |
52 | 54 |
| 55 @benchmark.Enabled('chromeos') |
53 class MediaChromeOS4kOnly(benchmark.Benchmark): | 56 class MediaChromeOS4kOnly(benchmark.Benchmark): |
54 """Benchmark for media performance on ChromeOS using only is_4k test content. | 57 """Benchmark for media performance on ChromeOS using only is_4k test content. |
55 """ | 58 """ |
56 test = media.Media | 59 test = media.Media |
57 tag = 'chromeOS4kOnly' | 60 tag = 'chromeOS4kOnly' |
58 page_set = page_sets.ToughVideoCasesPageSet | 61 page_set = page_sets.ToughVideoCasesPageSet |
59 options = { | 62 options = { |
60 'page_label_filter': 'is_4k', | 63 'page_label_filter': 'is_4k', |
61 # Exclude is_50fps test files: crbug/331816 | 64 # Exclude is_50fps test files: crbug/331816 |
62 'page_label_filter_exclude': 'is_50fps' | 65 'page_label_filter_exclude': 'is_50fps' |
63 } | 66 } |
64 | 67 |
65 | 68 |
| 69 @benchmark.Enabled('chromeos') |
66 class MediaChromeOS(benchmark.Benchmark): | 70 class MediaChromeOS(benchmark.Benchmark): |
67 """Benchmark for media performance on all ChromeOS platforms. | 71 """Benchmark for media performance on all ChromeOS platforms. |
68 | 72 |
69 This benchmark does not run is_4k content, there's a separate benchmark for | 73 This benchmark does not run is_4k content, there's a separate benchmark for |
70 that. | 74 that. |
71 """ | 75 """ |
72 test = media.Media | 76 test = media.Media |
73 tag = 'chromeOS' | 77 tag = 'chromeOS' |
74 page_set = page_sets.ToughVideoCasesPageSet | 78 page_set = page_sets.ToughVideoCasesPageSet |
75 # Exclude is_50fps test files: crbug/331816 | 79 # Exclude is_50fps test files: crbug/331816 |
76 options = {'page_label_filter_exclude': 'is_4k,is_50fps'} | 80 options = {'page_label_filter_exclude': 'is_4k,is_50fps'} |
77 | 81 |
78 | 82 |
79 class MediaSourceExtensions(benchmark.Benchmark): | 83 class MediaSourceExtensions(benchmark.Benchmark): |
80 """Obtains media metrics for key media source extensions functions.""" | 84 """Obtains media metrics for key media source extensions functions.""" |
81 test = _MSEMeasurement | 85 test = _MSEMeasurement |
82 page_set = page_sets.MseCasesPageSet | 86 page_set = page_sets.MseCasesPageSet |
83 | 87 |
84 def CustomizeBrowserOptions(self, options): | 88 def CustomizeBrowserOptions(self, options): |
85 # Needed to allow XHR requests to return stream objects. | 89 # Needed to allow XHR requests to return stream objects. |
86 options.AppendExtraBrowserArgs( | 90 options.AppendExtraBrowserArgs( |
87 ['--enable-experimental-web-platform-features', | 91 ['--enable-experimental-web-platform-features', |
88 '--disable-gesture-requirement-for-media-playback']) | 92 '--disable-gesture-requirement-for-media-playback']) |
OLD | NEW |