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

Unified Diff: chrome/test/media_router/telemetry/benchmarks/media_router_benchmark.py

Issue 1975603002: Add one benchmark to get CPU and memory usage without MR. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/test/media_router/telemetry/benchmarks/media_router_cpu_memory_metric.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/media_router/telemetry/benchmarks/media_router_benchmark.py
diff --git a/chrome/test/media_router/telemetry/benchmarks/media_router_benchmark.py b/chrome/test/media_router/telemetry/benchmarks/media_router_benchmark.py
index e8d1b692d26933020caf4e216223f81de4860a7b..7e799a478cc5270b3f048062a4327a7c087550eb 100644
--- a/chrome/test/media_router/telemetry/benchmarks/media_router_benchmark.py
+++ b/chrome/test/media_router/telemetry/benchmarks/media_router_benchmark.py
@@ -39,6 +39,7 @@ class _BaseCastBenchmark(perf_benchmark.PerfBenchmark):
class TraceEventCastBenckmark(_BaseCastBenchmark):
+ """Benchmark for dialog latency from trace event."""
def CreateTimelineBasedMeasurementOptions(self):
media_router_category = 'media_router'
@@ -61,6 +62,7 @@ class TraceEventCastBenckmark(_BaseCastBenchmark):
class HistogramCastBenckmark(_BaseCastBenchmark):
+ """Benchmark for dialog latency from histograms."""
def CreatePageTest(self, options):
return media_router_measurements.MediaRouterDialogTest()
@@ -76,6 +78,8 @@ class HistogramCastBenckmark(_BaseCastBenchmark):
class CPUMemoryCastBenckmark(_BaseCastBenchmark):
+ """Benchmark for CPU and memory usage with Media Router."""
+
options = {'page_repeat': 1}
page_set = media_router_perf_pages.MediaRouterCPUMemoryPageSet
@@ -86,3 +90,30 @@ class CPUMemoryCastBenckmark(_BaseCastBenchmark):
@classmethod
def Name(cls):
return 'media_router.cpu_memory'
+
+
+class CPUMemoryBenckmark(perf_benchmark.PerfBenchmark):
+ """Benchmark for CPU and memory usage without Media Router."""
+
+ options = {'page_repeat': 1}
+
+ page_set = media_router_perf_pages.CPUMemoryPageSet
+
+ def SetExtraBrowserOptions(self, options):
+ options.clear_sytem_cache_for_browser_and_profile_on_start = True
+ # This flag is required to enable the communication between the page and
+ # the test extension.
+ options.disable_background_networking = False
+ options.AppendExtraBrowserArgs([
+ '--load-extension=' +
imcheng 2016/05/12 20:57:08 1) we don't need to load the extension if MR is di
Lei Lei 2016/05/12 21:07:14 1), it doesn't load MR extension, it only loads th
+ os.path.join(path_util.GetChromiumSrcDir(), 'out',
+ 'Release', 'media_router', 'test_extension'),
+ '--enable-stats-collection-bindings'
+ ])
+
+ def CreatePageTest(self, options):
+ return media_router_measurements.MediaRouterCPUMemoryTest()
+
+ @classmethod
+ def Name(cls):
+ return 'media_router.cpu_memory.no_media_router'
« no previous file with comments | « no previous file | chrome/test/media_router/telemetry/benchmarks/media_router_cpu_memory_metric.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698