• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2017 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License
15  */
16 
17 package com.android.tv.perf;
18 
19 import static java.lang.annotation.RetentionPolicy.SOURCE;
20 
21 import android.support.annotation.StringDef;
22 import java.lang.annotation.Retention;
23 
24 /**
25  * Constants for performance event names.
26  *
27  * <p>Only constants are used to insure no PII is sent.
28 
29  */
30 public final class EventNames {
31 
32     @Retention(SOURCE)
33     @StringDef({
34         FETCH_EPG_TASK,
35         ON_DEVICE_SEARCH,
36         PROGRAM_GUIDE_SHOW,
37         PROGRAM_DATA_MANAGER_PROGRAMS_PREFETCH_TASK_DO_IN_BACKGROUND,
38         PROGRAM_GUIDE_SHOW_FROM_EMPTY_CACHE,
39         PROGRAM_GUIDE_SCROLL_HORIZONTALLY,
40         PROGRAM_GUIDE_SCROLL_VERTICALLY,
41         MEMORY_ON_PROGRAM_GUIDE_CLOSE
42     })
43     public @interface EventName {}
44 
45     public static final String FETCH_EPG_TASK = "FetchEpgTask";
46     /**
47      * Event name for query running time of on-device search in {@link
48      * com.android.tv.search.LocalSearchProvider}.
49      */
50     public static final String ON_DEVICE_SEARCH = "OnDeviceSearch";
51 
52     public static final String PROGRAM_GUIDE_SHOW = "ProgramGuide.show";
53     public static final String PROGRAM_DATA_MANAGER_PROGRAMS_PREFETCH_TASK_DO_IN_BACKGROUND =
54             "ProgramDataManager.ProgramsPrefetchTask.doInBackground";
55     public static final String PROGRAM_GUIDE_SHOW_FROM_EMPTY_CACHE =
56             "ProgramGuide.show.fromEmptyCache";
57     public static final String PROGRAM_GUIDE_SCROLL_HORIZONTALLY =
58             "ProgramGuide.scroll.horizontally";
59     public static final String PROGRAM_GUIDE_SCROLL_VERTICALLY = "ProgramGuide.scroll.vertically";
60     public static final String MEMORY_ON_PROGRAM_GUIDE_CLOSE = "ProgramGuide.memory.close";
61 
EventNames()62     private EventNames() {}
63 }
64