Commit 46ebfa2e authored by Alex Turner's avatar Alex Turner Committed by Commit Bot

Add command line arg to record additional UMAs in ad_tagging benchmark

Adds the --record-histogram benchmark command line argument to the
ad_tagging.cluster_telemetry benchmark. This allows for specifying
additional UMA histograms to record without generating a patch.

Bug: 1046108
Change-Id: I95a4d1bc2e5bda91e5147a0cfd65999baca5bf43
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2025530Reviewed-by: default avatarJohn Delaney <johnidel@chromium.org>
Commit-Queue: Alex Turner <alexmt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#736089}
parent 845062e7
...@@ -24,6 +24,10 @@ class AdTaggingClusterTelemetry(perf_benchmark.PerfBenchmark): ...@@ -24,6 +24,10 @@ class AdTaggingClusterTelemetry(perf_benchmark.PerfBenchmark):
@classmethod @classmethod
def AddBenchmarkCommandLineArgs(cls, parser): def AddBenchmarkCommandLineArgs(cls, parser):
ct_benchmarks_util.AddBenchmarkCommandLineArgs(parser) ct_benchmarks_util.AddBenchmarkCommandLineArgs(parser)
parser.add_option(
'--additional-histograms',
action='store',
help='Comma-separated list of additional UMA histograms to record.')
parser.add_option( parser.add_option(
'--verbose-cpu-metrics', '--verbose-cpu-metrics',
action='store_true', action='store_true',
...@@ -36,6 +40,9 @@ class AdTaggingClusterTelemetry(perf_benchmark.PerfBenchmark): ...@@ -36,6 +40,9 @@ class AdTaggingClusterTelemetry(perf_benchmark.PerfBenchmark):
@classmethod @classmethod
def ProcessCommandLineArgs(cls, parser, args): def ProcessCommandLineArgs(cls, parser, args):
ct_benchmarks_util.ValidateCommandLineArgs(parser, args) ct_benchmarks_util.ValidateCommandLineArgs(parser, args)
cls.additional_histograms = []
if args.additional_histograms is not None:
cls.additional_histograms = args.additional_histograms.split(',')
cls.enable_limited_cpu_time_metric = args.verbose_cpu_metrics cls.enable_limited_cpu_time_metric = args.verbose_cpu_metrics
cls.enable_memory_metric = args.verbose_memory_metrics cls.enable_memory_metric = args.verbose_memory_metrics
...@@ -73,6 +80,7 @@ class AdTaggingClusterTelemetry(perf_benchmark.PerfBenchmark): ...@@ -73,6 +80,7 @@ class AdTaggingClusterTelemetry(perf_benchmark.PerfBenchmark):
'PageLoad.Experimental.Bytes.NetworkIncludingHeaders', 'PageLoad.Experimental.Bytes.NetworkIncludingHeaders',
'PageLoad.PaintTiming.NavigationToFirstContentfulPaint', 'PageLoad.PaintTiming.NavigationToFirstContentfulPaint',
] ]
uma_histograms.extend(self.additional_histograms)
for histogram in uma_histograms: for histogram in uma_histograms:
tbm_options.config.chrome_trace_config.EnableUMAHistograms(histogram) tbm_options.config.chrome_trace_config.EnableUMAHistograms(histogram)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment