1 // Copyright 2023 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 package org.chromium.base.jank_tracker; 6 7 import androidx.annotation.IntDef; 8 9 import java.lang.annotation.Retention; 10 import java.lang.annotation.RetentionPolicy; 11 12 /** 13 * A list of jank scenarios to be tracked, each scenario corresponds to a specific user journey 14 * except by PERIODIC_REPORTING, which runs constantly and is uploaded every 30s. 15 * 16 * <p>IMPORTANT: This must be kept up to date with the histograms.xml histograms 17 * (Android.FrameTimelineJank..*) and the JankScenario C++ enum in 18 * //base/android/jank_metric_uma_recorder.cc. 19 */ 20 @IntDef({ 21 JankScenario.PERIODIC_REPORTING, 22 JankScenario.OMNIBOX_FOCUS, 23 JankScenario.NEW_TAB_PAGE, 24 JankScenario.STARTUP, 25 JankScenario.TAB_SWITCHER, 26 JankScenario.OPEN_LINK_IN_NEW_TAB, 27 JankScenario.START_SURFACE_HOMEPAGE, 28 JankScenario.START_SURFACE_TAB_SWITCHER, 29 JankScenario.FEED_SCROLLING, 30 JankScenario.WEBVIEW_SCROLLING 31 }) 32 @Retention(RetentionPolicy.SOURCE) 33 public @interface JankScenario { 34 int PERIODIC_REPORTING = 1; 35 int OMNIBOX_FOCUS = 2; 36 int NEW_TAB_PAGE = 3; 37 int STARTUP = 4; 38 int TAB_SWITCHER = 5; 39 int OPEN_LINK_IN_NEW_TAB = 6; 40 int START_SURFACE_HOMEPAGE = 7; 41 int START_SURFACE_TAB_SWITCHER = 8; 42 int FEED_SCROLLING = 9; 43 int WEBVIEW_SCROLLING = 10; 44 } 45