• 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  */
15 #ifndef I_APP_START_EVENT_POSTER_H
16 #define I_APP_START_EVENT_POSTER_H
17 
18 #include <string>
19 
20 namespace OHOS {
21 namespace HiviewDFX {
22 class IAppStartEventPoster {
23 public:
24     struct AppStartEventInfo {
25         int32_t appPid{0};
26         int32_t versionCode{0};
27         std::string versionName{""};
28         std::string processName{""};
29         std::string bundleName{""};
30         std::string abilityName{""};
31         std::string pageUrl{""};
32         std::string sceneId{""};
33         int32_t startType{0};
34         std::string sourceType{""};
35         uint64_t inputTime{0};
36         uint64_t responseLatency{0};
37         uint64_t launcherToAmsStartAbilityDur{0};
38         uint64_t amsStartAbilityToProcessStartDuration{0};
39         uint64_t amsProcessStartToAppAttachDuration{0};
40         uint64_t amsAppAttachToAppForegroundDuration{0};
41         uint64_t amsStartAbilityToAppForegroundDuration{0};
42         uint64_t amsAppFgToAbilityFgDur{0};
43         uint64_t amsAbilityFgToWmsStartWinDur{0};
44         uint64_t drawnLatency{0};
45         uint64_t firstFrameDrawnLatency{0};
46         uint64_t animationLatency{0};
47         uint64_t e2eLatency{0};
48         unsigned int actionId{0};
49         unsigned int eventId{0};
50         std::string traceFileName{""};
51         std::string infoFileName{""};
52         uint64_t happenTime{0};
53     };
54 
55     virtual ~IAppStartEventPoster() = default;
56     virtual void PostAppStartEvent(const AppStartEventInfo& evt) = 0;
57 };
58 } // HiviewDFX
59 } // OHOS
60 #endif