Commit 2a93b9e9 authored by Sadrul Habib Chowdhury's avatar Sadrul Habib Chowdhury Committed by Commit Bot

[cc/metrics] Create instant trace-events when a UMA is reported.

Create a trace-event at the point when UMA is reported, so that it
is easier to associate the UMA with the associated frames.

BUG=1095186

Change-Id: Id78695d21f3178e69c6025f580c2db49a67e3360
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2251300
Auto-Submit: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: default avatarXida Chen <xidachen@chromium.org>
Commit-Queue: Sadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#781128}
parent b6f96b67
...@@ -340,6 +340,11 @@ base::Optional<int> FrameSequenceMetrics::ThroughputData::ReportHistogram( ...@@ -340,6 +340,11 @@ base::Optional<int> FrameSequenceMetrics::ThroughputData::ReportHistogram(
ThroughputUkmReporter* const ukm_reporter = metrics->ukm_reporter(); ThroughputUkmReporter* const ukm_reporter = metrics->ukm_reporter();
if (is_animation) { if (is_animation) {
TRACE_EVENT_INSTANT2("cc,benchmark", "PercentDroppedFrames.AllAnimations",
TRACE_EVENT_SCOPE_THREAD, "frames_expected",
data.frames_expected, "frames_produced",
data.frames_produced);
UMA_HISTOGRAM_PERCENTAGE( UMA_HISTOGRAM_PERCENTAGE(
"Graphics.Smoothness.PercentDroppedFrames.AllAnimations", percent); "Graphics.Smoothness.PercentDroppedFrames.AllAnimations", percent);
if (ukm_reporter) { if (ukm_reporter) {
...@@ -349,6 +354,10 @@ base::Optional<int> FrameSequenceMetrics::ThroughputData::ReportHistogram( ...@@ -349,6 +354,10 @@ base::Optional<int> FrameSequenceMetrics::ThroughputData::ReportHistogram(
} }
if (is_interaction) { if (is_interaction) {
TRACE_EVENT_INSTANT2("cc,benchmark", "PercentDroppedFrames.AllInteractions",
TRACE_EVENT_SCOPE_THREAD, "frames_expected",
data.frames_expected, "frames_produced",
data.frames_produced);
UMA_HISTOGRAM_PERCENTAGE( UMA_HISTOGRAM_PERCENTAGE(
"Graphics.Smoothness.PercentDroppedFrames.AllInteractions", percent); "Graphics.Smoothness.PercentDroppedFrames.AllInteractions", percent);
if (ukm_reporter) { if (ukm_reporter) {
...@@ -358,6 +367,10 @@ base::Optional<int> FrameSequenceMetrics::ThroughputData::ReportHistogram( ...@@ -358,6 +367,10 @@ base::Optional<int> FrameSequenceMetrics::ThroughputData::ReportHistogram(
} }
if (is_animation || is_interaction) { if (is_animation || is_interaction) {
TRACE_EVENT_INSTANT2("cc,benchmark", "PercentDroppedFrames.AllSequences",
TRACE_EVENT_SCOPE_THREAD, "frames_expected",
data.frames_expected, "frames_produced",
data.frames_produced);
UMA_HISTOGRAM_PERCENTAGE( UMA_HISTOGRAM_PERCENTAGE(
"Graphics.Smoothness.PercentDroppedFrames.AllSequences", percent); "Graphics.Smoothness.PercentDroppedFrames.AllSequences", percent);
if (ukm_reporter) { if (ukm_reporter) {
......
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