• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2024 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15const events = {
16  RECORD_EVENT: 'record',
17  ONLINE_RECORD_EVENT: 'online_record',
18  LOAD_EVENT: 'load',
19  JS_MEMORY_EVENT: 'js_memory',
20  NATIVE_EVENT: 'native',
21  VIRTUAL_MEMORY_EVENT: 'virtual_memory',
22  MEMORY_TEMPLATE_EVENT: 'memory_template',
23  PERF_EVENT: 'perf',
24  ARKTS_EVENT: 'arkts',
25  FRAME_RECORD_EVENT: 'frame_record',
26  ANIMATION_EVENT: 'animation',
27  TASKPOOL_EVENT: 'taskpool',
28  APP_STARTUP_EVENT: 'app_startup',
29  SCHEDULING_RECORD_EVENT: 'scheduling_record',
30  FILE_SYSTEM_EVENT: 'file_system',
31  BIO_EVENT: 'bio',
32  SQL_EVENT: 'sql',
33  HISYS_EVENT: 'hisys',
34  SDK_RECORD_EVENT: 'sdk_record',
35  IMPORT_SO_EVENT: 'import_so',
36  HILOG_EVENT: 'hilog',
37  ABILITY_EVENT: 'ability',
38  TRACE_PARSING_EVENT: 'trace_parsing',
39  OPERATION_SKILLS_EVENT: 'operation_skills',
40  KEYWORDS_SHORTCUTS_EVENT: 'keywords_shortcuts',
41  XPOWER_EVENT: 'xpower',
42  EXTEND_EVENT: 'extensions',
43  FFRT_EVENT: 'ffrt',
44  TRACE_STREAMER_EXPLAIN_EVENT: 'trace_streamer_explain',
45};
46
47export interface EventDefinition {
48  event: string;
49  name: string;
50  index: number;
51}
52
53export const eventDefinitions: { [key: string]: EventDefinition } = {
54  quickstart_device_record: {
55    event: events.RECORD_EVENT,
56    name: 'quickstart_device_record',
57    index: 1,
58  },
59  quickstart_web_record: {
60    event: events.ONLINE_RECORD_EVENT,
61    name: 'quickstart_web_record',
62    index: 2,
63  },
64  quickstart_systemtrace: {
65    event: events.LOAD_EVENT,
66    name: 'quickstart_systemtrace',
67    index: 3,
68  },
69  quickstart_Js_memory: {
70    event: events.JS_MEMORY_EVENT,
71    name: 'quickstart_Js_memory',
72    index: 4,
73  },
74  quickstart_native_memory: {
75    event: events.NATIVE_EVENT,
76    name: 'quickstart_native_memory',
77    index: 5,
78  },
79  quickstart_page_fault: {
80    event: events.VIRTUAL_MEMORY_EVENT,
81    name: 'quickstart_page_fault',
82    index: 6,
83  },
84  quickstart_memory_template: {
85    event: events.MEMORY_TEMPLATE_EVENT,
86    name: 'quickstart_memory_template',
87    index: 7,
88  },
89  quickstart_hiperf: {
90    event: events.PERF_EVENT,
91    name: 'quickstart_hiperf',
92    index: 8,
93  },
94  quickstart_arkts: {
95    event: events.ARKTS_EVENT,
96    name: 'quickstart_arkts',
97    index: 9,
98  },
99  quickstart_Frametimeline: {
100    event: events.FRAME_RECORD_EVENT,
101    name: 'quickstart_Frametimeline',
102    index: 10,
103  },
104  quickstart_animation: {
105    event: events.ANIMATION_EVENT,
106    name: 'quickstart_animation',
107    index: 11,
108  },
109  quickstart_taskpool: {
110    event: events.TASKPOOL_EVENT,
111    name: 'quickstart_taskpool',
112    index: 12,
113  },
114  quickstart_app_startup: {
115    event: events.APP_STARTUP_EVENT,
116    name: 'quickstart_app_startup',
117    index: 13,
118  },
119  quickstart_schedulinganalysis: {
120    event: events.SCHEDULING_RECORD_EVENT,
121    name: 'quickstart_schedulinganalysis',
122    index: 14,
123  },
124  quickstart_filesystem: {
125    event: events.FILE_SYSTEM_EVENT,
126    name: 'quickstart_filesystem',
127    index: 15,
128  },
129  quickstart_bio: {
130    event: events.BIO_EVENT,
131    name: 'quickstart_bio',
132    index: 16,
133  },
134  quickstart_sql_metrics: {
135    event: events.SQL_EVENT,
136    name: 'quickstart_sql_metrics',
137    index: 17,
138  },
139  quickstart_hisystemevent: {
140    event: events.HISYS_EVENT,
141    name: 'quickstart_hisystemevent',
142    index: 18,
143  },
144  quickstart_sdk: {
145    event: events.SDK_RECORD_EVENT,
146    name: 'quickstart_sdk',
147    index: 19,
148  },
149  quickstart_Import_so: {
150    event: events.IMPORT_SO_EVENT,
151    name: 'quickstart_Import_so',
152    index: 20,
153  },
154  quickstart_hilog: {
155    event: events.HILOG_EVENT,
156    name: 'quickstart_hilog',
157    index: 21,
158  },
159  quickstart_ability_monitor: {
160    event: events.ABILITY_EVENT,
161    name: 'quickstart_ability_monitor',
162    index: 22,
163  },
164  quickstart_parsing_ability: {
165    event: events.TRACE_PARSING_EVENT,
166    name: 'quickstart_parsing_ability',
167    index: 23,
168  },
169  quickstart_Application_operation_skills: {
170    event: events.OPERATION_SKILLS_EVENT,
171    name: 'quickstart_Application_operation_skills',
172    index: 24,
173  },
174  quickstart_keywords_shortcuts: {
175    event: events.KEYWORDS_SHORTCUTS_EVENT,
176    name: 'quickstart_keywords_shortcuts',
177    index: 25,
178  },
179  quickstart_xpower: {
180    event: events.XPOWER_EVENT,
181    name: 'quickstart_xpower',
182    index: 26,
183  },
184  quickstart_extensions: {
185    event: events.EXTEND_EVENT,
186    name: 'quickstart_extensions',
187    index: 27,
188  },
189  quickstart_ffrt: {
190    event: events.FFRT_EVENT,
191    name: 'quickstart_ffrt',
192    index: 28,
193  },
194  des_tables: {
195    event: events.TRACE_STREAMER_EXPLAIN_EVENT,
196    name: 'des_tables',
197    index: 29,
198  },
199};
200