1 /*
2 * Copyright (c) 2023 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
16 #include "base/log/jank_frame_report.h"
17 #include "base/perfmonitor/perf_monitor.h"
18
19 namespace OHOS::Ace {
GetInstance()20 JankFrameReport& JankFrameReport::GetInstance()
21 {
22 static thread_local JankFrameReport instance;
23 return instance;
24 }
25
JankFrameReport()26 JankFrameReport::JankFrameReport() {}
27
JankFrameRecord(int64_t timeStampNanos,const std::string & windowName)28 void JankFrameReport::JankFrameRecord(int64_t timeStampNanos, const std::string& windowName) {}
29
SetFrameJankFlag(JankFrameFlag flag)30 void JankFrameReport::SetFrameJankFlag(JankFrameFlag flag) {}
31
ClearFrameJankFlag(JankFrameFlag flag)32 void JankFrameReport::ClearFrameJankFlag(JankFrameFlag flag) {}
33
StartRecord(const std::string & pageUrl)34 void JankFrameReport::StartRecord(const std::string& pageUrl) {}
35
FlushRecord()36 void JankFrameReport::FlushRecord() {}
37
RecordFrameUpdate()38 void JankFrameReport::RecordFrameUpdate() {}
39
GetPerfMonitor()40 PerfMonitor* PerfMonitor::GetPerfMonitor()
41 {
42 return nullptr;
43 }
44
Start(const std::string & sceneId,PerfActionType type,const std::string & note)45 void PerfMonitor::Start(const std::string& sceneId, PerfActionType type, const std::string& note) {}
46
End(const std::string & sceneId,bool isJsApi)47 void PerfMonitor::End(const std::string& sceneId, bool isJsApi) {}
48
StartCommercial(const std::string & sceneId,PerfActionType type,const std::string & note)49 void PerfMonitor::StartCommercial(const std::string& sceneId, PerfActionType type, const std::string& note) {}
50
EndCommercial(const std::string & sceneId,bool isJsApi)51 void PerfMonitor::EndCommercial(const std::string& sceneId, bool isJsApi) {}
52
SetPageUrl(const std::string & pageUrl)53 void PerfMonitor::SetPageUrl(const std::string& pageUrl) {}
54
SetFrameTime(int64_t vsyncTime,int64_t durition,double jank,const std::string & windowName)55 void PerfMonitor::SetFrameTime(int64_t vsyncTime, int64_t durition, double jank, const std::string& windowName) {}
56
ReportJankFrameApp(double jank)57 void PerfMonitor::ReportJankFrameApp(double jank) {}
58
RecordInputEvent(PerfActionType type,PerfSourceType sourceType,int64_t time)59 void PerfMonitor::RecordInputEvent(PerfActionType type, PerfSourceType sourceType, int64_t time) {}
60
GetInputTime(const std::string & sceneId,PerfActionType type,const std::string & note)61 int64_t PerfMonitor::GetInputTime(const std::string& sceneId, PerfActionType type, const std::string& note)
62 {
63 return 0;
64 }
65
GetPageUrl()66 std::string PerfMonitor::GetPageUrl()
67 {
68 return "";
69 }
70
SetAppForeground(bool isShow)71 void PerfMonitor::SetAppForeground(bool isShow) {}
72
SetAppStartStatus()73 void PerfMonitor::SetAppStartStatus() {}
SetPageName(const std::string & pageName)74 void PerfMonitor::SetPageName(const std::string& pageName) {}
ReportPageShowMsg(const std::string & pageUrl,const std::string & bundleName,const std::string & pageName)75 void PerfMonitor::ReportPageShowMsg(const std::string& pageUrl, const std::string& bundleName,
76 const std::string& pageName) {}
NotifyAppJankStatsBegin()77 void PerfMonitor::NotifyAppJankStatsBegin() {}
NotifyAppJankStatsEnd()78 void PerfMonitor::NotifyAppJankStatsEnd() {}
79 } // namespace OHOS::Ace
80