Commit 512c303e authored by ckitagawa's avatar ckitagawa Committed by Commit Bot

[Paint Preview] HadCapture metric

Record if the early check for a paint preview returns false. This
allows us to compute the overall success/failure ratio for all attempts
to show a paint preview.

Bug: 1109991
Change-Id: I6fdb3611d5182b64b628185017298a50b05dc311
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2377988Reviewed-by: default avatarMehran Mahmoudi <mahmoudi@chromium.org>
Reviewed-by: default avatarSteven Holte <holte@chromium.org>
Commit-Queue: Calder Kitagawa <ckitagawa@chromium.org>
Cr-Commit-Position: refs/heads/master@{#801849}
parent b07d8b06
......@@ -84,6 +84,11 @@ public class TabbedPaintPreviewMetricsHelper {
CompositorStatus.COUNT);
}
void recordHadCapture(boolean hadCapture) {
RecordHistogram.recordBooleanHistogram(
"Browser.PaintPreview.TabbedPlayer.HadCapture", hadCapture);
}
void recordExitMetrics(int exitCause, int snackbarShownCount) {
if (exitCause == ExitCause.SNACK_BAR_ACTION) {
RecordUserAction.record("PaintPreview.TabbedPlayer.Actionbar.Action");
......
......@@ -149,6 +149,7 @@ public class TabbedPaintPreviewPlayer implements TabViewProvider, UserData {
// Check if a capture exists. This is a quick check using a cache.
boolean hasCapture = mPaintPreviewTabService.hasCaptureForTab(mTab.getId());
mInitializing = hasCapture;
mMetricsHelper.recordHadCapture(hasCapture);
if (!hasCapture) return false;
mPlayerManager = new PlayerManager(mTab.getUrl(), mTab.getContext(),
......
......@@ -24096,6 +24096,18 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
</summary>
</histogram>
<histogram name="Browser.PaintPreview.TabbedPlayer.HadCapture" units="Boolean"
expires_after="2021-07-01">
<owner>ckitagawa@chromium.org</owner>
<owner>mahmoudi@chromium.org</owner>
<owner>fredmello@chromium.org</owner>
<summary>
Records whether a paint preview exists. Recorded when attempting to show a
preview on startup. This in conjuction with CompositorFailureReason gives
the total number of failures to show a paint preview.
</summary>
</histogram>
<histogram name="Browser.PaintPreview.TabbedPlayer.SnackbarCount" units="units"
expires_after="2020-10-20">
<owner>ckitagawa@chromium.org</owner>
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