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
SetPageUrl(const std::string & pageUrl)49 void PerfMonitor::SetPageUrl(const std::string& pageUrl) {}
50
SetFrameTime(int64_t vsyncTime,int64_t durition,double jank,const std::string & windowName)51 void PerfMonitor::SetFrameTime(int64_t vsyncTime, int64_t durition, double jank, const std::string& windowName) {}
52
ReportJankFrameApp(double jank)53 void PerfMonitor::ReportJankFrameApp(double jank) {}
54
RecordInputEvent(PerfActionType type,PerfSourceType sourceType,int64_t time)55 void PerfMonitor::RecordInputEvent(PerfActionType type, PerfSourceType sourceType, int64_t time) {}
56
GetInputTime(const std::string & sceneId,PerfActionType type,const std::string & note)57 int64_t PerfMonitor::GetInputTime(const std::string& sceneId, PerfActionType type, const std::string& note)
58 {
59 return 0;
60 }
61
GetPageUrl()62 std::string PerfMonitor::GetPageUrl()
63 {
64 return "";
65 }
66
SetAppForeground(bool isShow)67 void PerfMonitor::SetAppForeground(bool isShow) {}
68
SetAppStartStatus()69 void PerfMonitor::SetAppStartStatus() {}
SetPageName(const std::string & pageName)70 void PerfMonitor::SetPageName(const std::string& pageName) {}
ReportPageShowMsg(const std::string & pageUrl,const std::string & bundleName,const std::string & pageName)71 void PerfMonitor::ReportPageShowMsg(const std::string& pageUrl, const std::string& bundleName,
72 const std::string& pageName) {}
73 } // namespace OHOS::Ace
74