• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2025 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 #include "cpu_data_processor.h"
16 
17 namespace OHOS {
18 namespace AppExecFwk {
CpuDataProcessor(const std::vector<std::vector<CpuFreqData>> & cpuData,const std::vector<TotalTime> & totalTimeList,CpuStartTime cpuStartTime,const std::string & stackPath,int32_t pid)19 CpuDataProcessor::CpuDataProcessor(const std::vector<std::vector<CpuFreqData>> &cpuData,
20     const std::vector<TotalTime> &totalTimeList, CpuStartTime cpuStartTime,
21     const std::string &stackPath, int32_t pid)
22     : handlingHalfCpuData_(cpuData), totalTimeList_(totalTimeList), cpuStartTime_(cpuStartTime), stackPath_(stackPath),
23     pid_(pid)
24 {
25 }
26 
GetHandlingHalfCpuData() const27 std::vector<std::vector<CpuFreqData>> CpuDataProcessor::GetHandlingHalfCpuData() const
28 {
29     return handlingHalfCpuData_;
30 }
31 
GetTotalTimeList() const32 std::vector<TotalTime> CpuDataProcessor::GetTotalTimeList() const
33 {
34     return totalTimeList_;
35 }
36 
GetCpuStartTime() const37 CpuStartTime CpuDataProcessor::GetCpuStartTime() const
38 {
39     return cpuStartTime_;
40 }
41 
GetStackPath() const42 std::string CpuDataProcessor::GetStackPath() const
43 {
44     return stackPath_;
45 }
46 
GetPid() const47 int32_t CpuDataProcessor::GetPid() const
48 {
49     return pid_;
50 }
51 }  // namespace AppExecFwk
52 }  // namespace OHOS
53