1#  Copyright (c) 2021-2022 Huawei Device Co., Ltd.
2#  Licensed under the Apache License, Version 2.0 (the "License");
3#  you may not use this file except in compliance with the License.
4#  You may obtain a copy of the License at
5#
6#      http://www.apache.org/licenses/LICENSE-2.0
7#
8#  Unless required by applicable law or agreed to in writing, software
9#  distributed under the License is distributed on an "AS IS" BASIS,
10#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11#  See the License for the specific language governing permissions and
12#  limitations under the License.
13
14#####################################################
15#     below is the format of defining event         #
16#####################################################
17#domain: domain name.  [Only one domain name can be defined at the top]
18#
19#author: the author name who defined this event.
20#date: the date when this event was defined, format is YYYY-MM-DD.
21#logged: source file which refer to this event.
22#usage: the usage of this event.
23#//Define event name and event properties.
24#@EVENT_NAME: the event definition part begin.
25#  // __BASE is used for defining the basic info of the event.
26#  // "type" optional values are: FAULT, STATISTICS, SECURITY, BEHAVIOR.
27#  // "level" optional values are: CRITICAL, MINOR.
28#  // "tag" set tags with may used by subscriber of this event, multiple tags divided by space.
29#  // "desc" full description of this event.
30#  @PARAMETER: {type: parameter type, arrsize: array length(optional), desc: parameter description}.
31#  // follow the __BASE block, each line defines a parameter of this event.
32#  // "type" optional values are: INT8, UINT8, INT16, UINT16, INT32, UINT32, INT64, UINT64, FLOAT, DOUBLE, STRING.
33#  // "arrsize" of the parameter is an array, set a non-zero value.
34#  // "desc" full description of this parameter.
35
36#####################################################
37#   Example of some hiviewdfx events definition     #
38#####################################################
39
40domain: ACE
41
42JS_CARD_FIRST_RENDER_TIME:
43  __BASE: {type: STATISTIC, level: MINOR, desc: js card first render duration}
44  SESSION_ID: {type: STRING, desc: session id}
45  DURATION: {type: UINT64, desc: duration from js card created to first render}
46
47JS_CARD_FIRST_UPDATE_TIME:
48  __BASE: {type: STATISTIC, level: MINOR, desc: js card first update duration}
49  SESSION_ID: {type: STRING, desc: session id}
50  DURATION: {type: UINT64, desc: duration from js card first update to render}
51
52FRAMEWORK_APP_START_EXCEPTION:
53  __BASE: { type: FAULT, level: MINOR, desc: application start exception }
54  ERROR_TYPE: { type: INT32, desc: error type }
55  PACKAGE_NAME: { type: STRING, desc: package name }
56
57FRAMEWORK_PAGE_ROUTER_EXCEPTION:
58  __BASE: { type: FAULT, level: MINOR, desc: page router exception }
59  ERROR_TYPE: { type: INT32, desc: error type }
60  PACKAGE_NAME: { type: STRING, desc: package name }
61  PAGE_NAME: { type: STRING, desc: page name }
62
63COMPONENT_EXCEPTION:
64  __BASE: { type: FAULT, level: MINOR, desc: component exception }
65  ERROR_TYPE: { type: INT32, desc: error type }
66  PACKAGE_NAME: { type: STRING, desc: package name }
67
68API_CHANNEL_EXCEPTION:
69  __BASE: { type: FAULT, level: MINOR, desc: API channel exception }
70  ERROR_TYPE: { type: INT32, desc: error type }
71  PACKAGE_NAME: { type: STRING, desc: package name }
72
73RENDER_EXCEPTION:
74  __BASE: { type: FAULT, level: MINOR, desc: render exception }
75  ERROR_TYPE: { type: INT32, desc: error type }
76  PACKAGE_NAME: { type: STRING, desc: package name }
77  RENDER_OBJECT_NAME: { type: STRING, desc: render object name }
78
79JS_EXCEPTION:
80  __BASE: { type: FAULT, level: MINOR, desc: JS exception }
81  ERROR_TYPE: { type: INT32, desc: error type }
82  PACKAGE_NAME: { type: STRING, desc: package name }
83
84ANIMATION_EXCEPTION:
85  __BASE: { type: FAULT, level: MINOR, desc: animation exception }
86  ERROR_TYPE: { type: INT32, desc: error type }
87  PACKAGE_NAME: { type: STRING, desc: package name }
88
89EVENT_EXCEPTION:
90  __BASE: { type: FAULT, level: MINOR, desc: event exception }
91  ERROR_TYPE: { type: INT32, desc: error type }
92  PACKAGE_NAME: { type: STRING, desc: package name }
93
94PLUGIN_EXCEPTION:
95  __BASE: { type: FAULT, level: MINOR, desc: plugin exception }
96  ERROR_TYPE: { type: INT32, desc: error type }
97  PACKAGE_NAME: { type: STRING, desc: package name }
98
99INTERNATIONALIZATION_EXCEPTION:
100  __BASE: { type: FAULT, level: MINOR, desc: internationalization exception }
101  ERROR_TYPE: { type: INT32, desc: error type }
102  PACKAGE_NAME: { type: STRING, desc: package name }
103
104ACCESSIBILITY_EXCEPTION:
105  __BASE: { type: FAULT, level: MINOR, desc: accessibility exception }
106  ERROR_TYPE: { type: INT32, desc: error type }
107  PACKAGE_NAME: { type: STRING, desc: package name }
108
109FORM_EXCEPTION:
110  __BASE: { type: FAULT, level: MINOR, desc: form exception }
111  ERROR_TYPE: { type: INT32, desc: error type }
112  PACKAGE_NAME: { type: STRING, desc: package name }
113
114JS_ERROR:
115  __BASE: { type: FAULT, level: MINOR, desc: JS runtime exception }
116  PACKAGE_NAME: { type: STRING, desc: package name }
117  REASON: { type: STRING, desc: js runtime error reason }
118  SUMMARY: { type: STRING, desc: js runtime error summary }
119  FINGERPRINT: {type: STRING, desc: unique id for grouping same fault}
120  PANME: {type: STRING, desc: process name}
121  FIRST_FRAME: {type: STRING, desc: first stack info}
122  SECOND_FRAME: {type: STRING, desc: second stack info}
123  LAST_FRAME: {type: STRING, desc: last stack info}
124
125UI_BLOCK_3S:
126  __BASE: {type: FAULT, level: CRITICAL, desc: The thread is blocked for 3s }
127  UID: {type: INT32, desc: application uid}
128  PACKAGE_NAME: {type: STRING, desc: application package name}
129  PROCESS_NAME: {type: STRING, desc: application process name}
130  MSG: {type: STRING, desc: application event message}
131  CMD: {type: STRING, desc: application event cmd}
132
133UI_BLOCK_6S:
134  __BASE: {type: FAULT, level: CRITICAL, desc: The thread is blocked for 6s }
135  UID: {type: INT32, desc: application uid}
136  PACKAGE_NAME: {type: STRING, desc: application package name}
137  PROCESS_NAME: {type: STRING, desc: application process name}
138  MSG: {type: STRING, desc: application event message}
139  CMD: {type: STRING, desc: application event cmd}
140
141UI_BLOCK_RECOVERED:
142  __BASE: {type: FAULT, level: CRITICAL, desc: The thread is recovered }
143  UID: {type: INT32, desc: application uid}
144  PACKAGE_NAME: {type: STRING, desc: application package name}
145  PROCESS_NAME: {type: STRING, desc: application process name}
146  MSG: {type: STRING, desc: application event message}
147  CMD: {type: STRING, desc: application event cmd}
148
149UI_BLOCK_DIALOG:
150  __BASE: {type: FAULT, level: CRITICAL, desc: Dialog is displayed when the thread is blocked }
151  PID: {type: INT32, desc: application pid}
152  UID: {type: INT32, desc: application uid}
153  PACKAGE_NAME: {type: STRING, desc: application package name}
154  PROCESS_NAME: {type: STRING, desc: application process name}
155  MSG: {type: STRING, desc: application event message}
156
157JANK_STATS_APP:
158  __BASE: {type: STATISTIC, level: MINOR, tag: performance, desc: jank statistics}
159  STARTTIME: {type: INT64, desc: begin time since last report}
160  DURATION: {type: INT64, desc: duration since last report}
161  VERSION_CODE: {type: UINT32, desc: app version code}
162  VERSION_NAME: {type: STRING, desc: app version name}
163  BUNDLE_NAME: {type: STRING, desc: package name}
164  ABILITY_NAME: {type: STRING, desc: ability name}
165  PAGE_URL: {type: STRING, desc: page name}
166  JANK_STATS: {type: UINT16, arrsize: 8, desc: jank frame stats}
167  JANK_STATS_VER: {type: UINT32, desc: jank range version}
168
169INTERACTION_COMPLETED_LATENCY:
170  __BASE: {type: BEHAVIOR, level: MINOR, tag: performance, desc: interaction complete statistics}
171  APP_PID: {type: INT32, desc: app pid}
172  BUNDLE_NAME: {type: STRING, desc: package name}
173  PROCESS_NAME: {type: STRING, desc: process name}
174  ABILITY_NAME: {type: STRING, desc: ability name}
175  PAGE_URL: {type: STRING, desc: page url}
176  VERSION_CODE: {type: INT32, desc: version code}
177  VERSION_NAME: {type: STRING, desc: version name}
178  SCENE_ID: {type: STRING, desc: interaction scene id}
179  SOURCE_TYPE: {type: STRING, desc: scene source type}
180  INPUT_TIME: {type: UINT64, desc: input time when multimodel receive from kernel}
181  ANIMATION_START_LATENCY: {type: UINT64, desc: animation start time of the scene}
182  ANIMATION_END_LATENCY: {type: UINT64, desc: end time of the scene}
183  E2E_LATENCY: {type: UINT64, desc: end to end time}
184  NOTE: {type: STRING, desc: extra infomation}
185
186INTERACTION_APP_JANK:
187  __BASE: {type: BEHAVIOR, level: MINOR, tag: performance, desc: interaction jank statistics}
188  UNIQUE_ID: {type: INT32, desc: unique id}
189  SCENE_ID: {type: STRING, desc: interaction scene id}
190  PROCESS_NAME: {type: STRING, desc: process name}
191  MODULE_NAME: {type: STRING, desc: package name}
192  ABILITY_NAME: {type: STRING, desc: ability name}
193  PAGE_URL: {type: STRING, desc: page url}
194  VERSION_CODE: {type: INT32, desc: version code}
195  VERSION_NAME: {type: STRING, desc: version name}
196  STARTTIME: {type: UINT64, desc: interaction scene begin time}
197  DURATION: {type: UINT64, desc: interaction duration}
198  TOTAL_FRAMES: {type: INT32, desc: total app frames during the scene}
199  TOTAL_MISSED_FRAMES: {type: INT32, desc: total missed frames during the scene}
200  MAX_FRAMETIME: {type: UINT64, desc: max single frame time during the scene}
201  MAX_SEQ_MISSED_FRAMES: {type: INT32, desc: max successive missed frames during the scene}
202  NOTE: {type: STRING, desc: extra infomation}