Commit d011df96 authored by Sadrul Habib Chowdhury's avatar Sadrul Habib Chowdhury Committed by Commit Bot

system_health: Report some rendering metrics.

Report the top-level UMA metrics for rendering from the system_health
benchmark.

BUG=1080679

Change-Id: Ie8e1810714780c786200d6d703e0dcacdd2ab041
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2198597
Commit-Queue: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: default avatarJohn Chen <johnchen@chromium.org>
Reviewed-by: default avatarStephen Nusko <nuskos@chromium.org>
Reviewed-by: default avatarTimothy Dresser <tdresser@chromium.org>
Cr-Commit-Position: refs/heads/master@{#770923}
parent 9c7a3f6e
...@@ -869,7 +869,7 @@ void TraceEventDataSource::LogHistogram(base::HistogramBase* histogram) { ...@@ -869,7 +869,7 @@ void TraceEventDataSource::LogHistogram(base::HistogramBase* histogram) {
base::Base64Encode( base::Base64Encode(
std::string(static_cast<const char*>(pickle.data()), pickle.size()), std::string(static_cast<const char*>(pickle.data()), pickle.size()),
&buckets); &buckets);
TRACE_EVENT_INSTANT2("benchmark", "UMAHistogramSamples", TRACE_EVENT_INSTANT2("benchmark,uma", "UMAHistogramSamples",
TRACE_EVENT_SCOPE_PROCESS, "name", TRACE_EVENT_SCOPE_PROCESS, "name",
histogram->histogram_name(), "buckets", buckets); histogram->histogram_name(), "buckets", buckets);
} }
......
...@@ -15,6 +15,15 @@ from telemetry.web_perf import timeline_based_measurement ...@@ -15,6 +15,15 @@ from telemetry.web_perf import timeline_based_measurement
import page_sets import page_sets
SYSTEM_HEALTH_BENCHMARK_UMA = [
'Event.Latency.ScrollBegin.TimeToScrollUpdateSwapBegin2',
'Event.Latency.ScrollUpdate.TimeToScrollUpdateSwapBegin2',
'Graphics.Smoothness.PercentDroppedFrames.AllSequences',
'Memory.GPU.PeakMemoryUsage.Scroll',
'Memory.GPU.PeakMemoryUsage.PageLoad',
]
class _CommonSystemHealthBenchmark(perf_benchmark.PerfBenchmark): class _CommonSystemHealthBenchmark(perf_benchmark.PerfBenchmark):
"""Chrome Common System Health Benchmark. """Chrome Common System Health Benchmark.
...@@ -30,7 +39,7 @@ class _CommonSystemHealthBenchmark(perf_benchmark.PerfBenchmark): ...@@ -30,7 +39,7 @@ class _CommonSystemHealthBenchmark(perf_benchmark.PerfBenchmark):
def CreateCoreTimelineBasedMeasurementOptions(self): def CreateCoreTimelineBasedMeasurementOptions(self):
cat_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter( cat_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter(
filter_string='rail,toplevel') filter_string='rail,toplevel,uma')
cat_filter.AddIncludedCategory('accessibility') cat_filter.AddIncludedCategory('accessibility')
# Needed for the metric reported by page. # Needed for the metric reported by page.
cat_filter.AddIncludedCategory('blink.user_timing') cat_filter.AddIncludedCategory('blink.user_timing')
...@@ -40,19 +49,27 @@ class _CommonSystemHealthBenchmark(perf_benchmark.PerfBenchmark): ...@@ -40,19 +49,27 @@ class _CommonSystemHealthBenchmark(perf_benchmark.PerfBenchmark):
options = timeline_based_measurement.Options(cat_filter) options = timeline_based_measurement.Options(cat_filter)
options.config.enable_chrome_trace = True options.config.enable_chrome_trace = True
options.config.enable_cpu_trace = True options.config.enable_cpu_trace = True
options.config.chrome_trace_config.EnableUMAHistograms(
*SYSTEM_HEALTH_BENCHMARK_UMA)
options.SetTimelineBasedMetrics([ options.SetTimelineBasedMetrics([
'accessibilityMetric', 'accessibilityMetric',
'consoleErrorMetric', 'consoleErrorMetric',
'cpuTimeMetric', 'cpuTimeMetric',
'limitedCpuTimeMetric', 'limitedCpuTimeMetric',
'reportedByPageMetric', 'reportedByPageMetric',
'tracingMetric' 'tracingMetric',
'umaMetric',
]) ])
loading_metrics_category.AugmentOptionsForLoadingMetrics(options) loading_metrics_category.AugmentOptionsForLoadingMetrics(options)
# The EQT metric depends on the same categories as the loading metric. # The EQT metric depends on the same categories as the loading metric.
options.AddTimelineBasedMetric('expectedQueueingTimeMetric') options.AddTimelineBasedMetric('expectedQueueingTimeMetric')
return options return options
def SetExtraBrowserOptions(self, options):
# Using the software fallback can skew the rendering related metrics. So
# disable that.
options.AppendExtraBrowserArgs('--disable-software-compositing-fallback')
def CreateStorySet(self, options): def CreateStorySet(self, options):
return page_sets.SystemHealthStorySet(platform=self.PLATFORM) return page_sets.SystemHealthStorySet(platform=self.PLATFORM)
......
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