• 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 
16 #ifndef HIVIEW_FRAMEWORK_NATIVE_UNIFIED_COLLECTION_PERF_COLLECTOR_EMPTY_IMPL_H
17 #define HIVIEW_FRAMEWORK_NATIVE_UNIFIED_COLLECTION_PERF_COLLECTOR_EMPTY_IMPL_H
18 
19 #include "perf_collector.h"
20 
21 namespace OHOS {
22 namespace HiviewDFX {
23 namespace UCollectUtil {
24 class PerfCollectorEmptyImpl : public PerfCollector {
25 public:
26     virtual CollectResult<bool> StartPerf(const std::string &logDir) override;
27     void SetSelectPids(const std::vector<pid_t> &selectPids) override;
28     void SetTargetSystemWide(bool enable) override;
29     void SetTimeStopSec(int timeStopSec) override;
30     void SetFrequency(int frequency) override;
31     void SetOffCPU(bool offCPU) override;
32     void SetOutputFilename(const std::string &outputFilename) override;
33     void SetCallGraph(const std::string &sampleTypes) override;
34     void SetSelectEvents(const std::vector<std::string> &selectEvents) override;
35     void SetCpuPercent(int cpuPercent) override;
36     void SetReport(bool enable) override;
37     CollectResult<bool> Prepare(const std::string &logDir) override;
38     CollectResult<bool> StartRun() override;
39     CollectResult<bool> Pause() override;
40     CollectResult<bool> Resume() override;
41     CollectResult<bool> Stop() override;
42 };
43 } // namespace UCollectUtil
44 } // namespace HiviewDFX
45 } // namespace OHOS
46 #endif // HIVIEW_FRAMEWORK_NATIVE_UNIFIED_COLLECTION_PERF_COLLECTOR_EMPTY_IMPL_H
47