Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 core import perf_benchmark | 5 from core import perf_benchmark |
| 6 | 6 |
| 7 from measurements import memory | 7 from measurements import memory |
| 8 import page_sets | 8 import page_sets |
| 9 from telemetry import benchmark | 9 from telemetry import benchmark |
| 10 | 10 |
| 11 from telemetry.timeline import tracing_category_filter | |
| 12 from telemetry.web_perf import timeline_based_measurement | |
| 13 from telemetry.web_perf.metrics import v8_gc_latency | |
| 14 from telemetry.web_perf.metrics import memory_timeline | |
| 11 | 15 |
| 12 @benchmark.Disabled('all') # crbug.com/581147 | 16 @benchmark.Disabled('all') # crbug.com/581147 |
| 13 class MemoryMobile(perf_benchmark.PerfBenchmark): | 17 class MemoryMobile(perf_benchmark.PerfBenchmark): |
| 14 test = memory.Memory | 18 test = memory.Memory |
| 15 page_set = page_sets.MobileMemoryPageSet | 19 page_set = page_sets.MobileMemoryPageSet |
| 16 | 20 |
| 17 @classmethod | 21 @classmethod |
| 18 def Name(cls): | 22 def Name(cls): |
| 19 return 'memory.mobile_memory' | 23 return 'memory.mobile_memory' |
| 20 | 24 |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 31 | 35 |
| 32 @classmethod | 36 @classmethod |
| 33 def Name(cls): | 37 def Name(cls): |
| 34 return 'memory.top_7_stress' | 38 return 'memory.top_7_stress' |
| 35 | 39 |
| 36 @classmethod | 40 @classmethod |
| 37 def ShouldDisable(cls, possible_browser): | 41 def ShouldDisable(cls, possible_browser): |
| 38 return cls.IsSvelte(possible_browser) # http://crbug.com/555092 | 42 return cls.IsSvelte(possible_browser) # http://crbug.com/555092 |
| 39 | 43 |
| 40 | 44 |
| 41 class MemoryLongRunningIdleGmail(perf_benchmark.PerfBenchmark): | 45 # Disabled on reference builds because they don't support the new |
| 46 # Tracing.requestMemoryDump DevTools API. See http://crbug.com/540022. | |
| 47 @benchmark.Disabled('reference', 'android') # crbug.com/579546 | |
|
perezju
2016/03/09 15:07:55
just double checking, why disabling this test on a
ulan
2016/03/09 17:18:39
The page is too heavy for android, fails with OOM.
| |
| 48 class MemoryLongRunningIdleGmailTBM(perf_benchmark.PerfBenchmark): | |
|
perezju
2016/03/09 15:07:55
maybe move benchmark to memory_infra.py and subcla
ulan
2016/03/09 17:18:39
Done.
| |
| 42 """Use (recorded) real world web sites and measure memory consumption | 49 """Use (recorded) real world web sites and measure memory consumption |
| 43 of long running idle Gmail page """ | 50 of long running idle Gmail page """ |
| 44 test = memory.Memory | |
| 45 page_set = page_sets.LongRunningIdleGmailPageSet | 51 page_set = page_sets.LongRunningIdleGmailPageSet |
| 46 | 52 |
| 53 def SetExtraBrowserOptions(self, options): | |
| 54 options.AppendExtraBrowserArgs([ | |
| 55 # TODO(perezju): Temporary workaround to disable periodic memory dumps. | |
| 56 # See: http://crbug.com/513692 | |
| 57 '--enable-memory-benchmarking', | |
| 58 ]) | |
| 59 | |
| 60 def CreateTimelineBasedMeasurementOptions(self): | |
| 61 v8_categories = [ | |
| 62 'blink.console', 'renderer.scheduler', 'v8', 'webkit.console'] | |
| 63 memory_categories = 'blink.console,disabled-by-default-memory-infra' | |
| 64 category_filter = tracing_category_filter.TracingCategoryFilter( | |
| 65 memory_categories) | |
| 66 for category in v8_categories: | |
| 67 category_filter.AddIncludedCategory(category) | |
| 68 options = timeline_based_measurement.Options(category_filter) | |
| 69 options.SetLegacyTimelineBasedMetrics([ | |
|
perezju
2016/03/09 15:07:55
maybe this should be moved to SetupBenchmarkDefaul
ulan
2016/03/09 17:18:39
I tried that, but the method was not being called
perezju
2016/03/10 09:34:36
Hmm, you're right. SetupTraceRerunOptions is only
ulan
2016/03/10 11:09:25
Done.
| |
| 70 v8_gc_latency.V8GCLatency(), | |
| 71 memory_timeline.MemoryTimelineMetric()]) | |
| 72 return options | |
| 73 | |
| 47 @classmethod | 74 @classmethod |
| 48 def Name(cls): | 75 def Name(cls): |
| 49 return 'memory.long_running_idle_gmail' | 76 return 'memory.long_running_idle_gmail_tbm' |
| 50 | 77 |
| 78 @classmethod | |
| 79 def ShouldTearDownStateAfterEachStoryRun(cls): | |
| 80 return True | |
| 51 | 81 |
| 52 @benchmark.Disabled('android') # crbug.com/542682 | 82 @benchmark.Disabled('android') # crbug.com/542682 |
| 53 class MemoryLongRunningIdleGmailBackground(perf_benchmark.PerfBenchmark): | 83 class MemoryLongRunningIdleGmailBackground(perf_benchmark.PerfBenchmark): |
| 54 """Use (recorded) real world web sites and measure memory consumption | 84 """Use (recorded) real world web sites and measure memory consumption |
| 55 of long running idle Gmail page in background tab""" | 85 of long running idle Gmail page in background tab""" |
| 56 test = memory.Memory | 86 test = memory.Memory |
| 57 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet | 87 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet |
| 58 | 88 |
| 59 @classmethod | 89 @classmethod |
| 60 def Name(cls): | 90 def Name(cls): |
| 61 return 'memory.long_running_idle_gmail_background' | 91 return 'memory.long_running_idle_gmail_background' |
| OLD | NEW |