106f6ba60Sopenharmony_ci/*
206f6ba60Sopenharmony_ci * Copyright (C) 2021 Huawei Device Co., Ltd.
306f6ba60Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
406f6ba60Sopenharmony_ci * you may not use this file except in compliance with the License.
506f6ba60Sopenharmony_ci * You may obtain a copy of the License at
606f6ba60Sopenharmony_ci *
706f6ba60Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0
806f6ba60Sopenharmony_ci *
906f6ba60Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1006f6ba60Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1106f6ba60Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1206f6ba60Sopenharmony_ci * See the License for the specific language governing permissions and
1306f6ba60Sopenharmony_ci * limitations under the License.
1406f6ba60Sopenharmony_ci */
1506f6ba60Sopenharmony_ci#ifndef COMMON_H
1606f6ba60Sopenharmony_ci#define COMMON_H
1706f6ba60Sopenharmony_ci#include <unordered_map>
1806f6ba60Sopenharmony_ci#include <string>
1906f6ba60Sopenharmony_cinamespace OHOS {
2006f6ba60Sopenharmony_cinamespace SmartPerf {
2106f6ba60Sopenharmony_cienum class MessageType {
2206f6ba60Sopenharmony_ci    GET_CPU_NUM,
2306f6ba60Sopenharmony_ci    GET_CPU_FREQ_LOAD,
2406f6ba60Sopenharmony_ci    SET_PKG_NAME,
2506f6ba60Sopenharmony_ci    SET_PROCESS_ID,
2606f6ba60Sopenharmony_ci    GET_FPS_AND_JITTERS,
2706f6ba60Sopenharmony_ci    GET_GPU_FREQ,
2806f6ba60Sopenharmony_ci    GET_GPU_LOAD,
2906f6ba60Sopenharmony_ci    GET_DDR_FREQ,
3006f6ba60Sopenharmony_ci    GET_RAM_INFO,
3106f6ba60Sopenharmony_ci    GET_MEMORY_INFO,
3206f6ba60Sopenharmony_ci    GET_TEMPERATURE,
3306f6ba60Sopenharmony_ci    GET_POWER,
3406f6ba60Sopenharmony_ci    GET_CAPTURE,
3506f6ba60Sopenharmony_ci    CATCH_TRACE_CONFIG,
3606f6ba60Sopenharmony_ci    CATCH_TRACE_CMD,
3706f6ba60Sopenharmony_ci    SET_DUBAI_DB,
3806f6ba60Sopenharmony_ci    CATCH_NETWORK_TRAFFIC,
3906f6ba60Sopenharmony_ci    GET_NETWORK_TRAFFIC, // 获取网络流量信息
4006f6ba60Sopenharmony_ci    BACK_TO_DESKTOP,
4106f6ba60Sopenharmony_ci    GET_CUR_FPS,
4206f6ba60Sopenharmony_ci    GET_LOW_POWER_FPS,
4306f6ba60Sopenharmony_ci    FPS_STOP,
4406f6ba60Sopenharmony_ci    SET_GAME_VIEW,
4506f6ba60Sopenharmony_ci};
4606f6ba60Sopenharmony_ci
4706f6ba60Sopenharmony_ciconst std::unordered_map<MessageType, std::string> MESSAGE_MAP = {
4806f6ba60Sopenharmony_ci    { MessageType::GET_CPU_NUM, std::string("get_cpu_num") },
4906f6ba60Sopenharmony_ci    { MessageType::GET_CPU_FREQ_LOAD, std::string("get_cpu_freq_load") },
5006f6ba60Sopenharmony_ci    { MessageType::SET_PKG_NAME, std::string("set_pkgName") },
5106f6ba60Sopenharmony_ci    { MessageType::SET_PROCESS_ID, std::string("set_pid") },
5206f6ba60Sopenharmony_ci    { MessageType::GET_FPS_AND_JITTERS, std::string("get_fps_and_jitters") },
5306f6ba60Sopenharmony_ci    { MessageType::GET_GPU_FREQ, std::string("get_gpu_freq") },
5406f6ba60Sopenharmony_ci    { MessageType::GET_GPU_LOAD, std::string("get_gpu_load") },
5506f6ba60Sopenharmony_ci    { MessageType::GET_DDR_FREQ, std::string("get_ddr_freq") },
5606f6ba60Sopenharmony_ci    { MessageType::GET_RAM_INFO, std::string("get_ram_info") },
5706f6ba60Sopenharmony_ci    { MessageType::GET_TEMPERATURE, std::string("get_temperature") },
5806f6ba60Sopenharmony_ci    { MessageType::GET_POWER, std::string("get_power") },
5906f6ba60Sopenharmony_ci    { MessageType::GET_CAPTURE, std::string("get_capture") },
6006f6ba60Sopenharmony_ci    { MessageType::GET_MEMORY_INFO, std::string("get_memory") },
6106f6ba60Sopenharmony_ci    { MessageType::CATCH_TRACE_CONFIG, std::string("catch_trace_config") },
6206f6ba60Sopenharmony_ci    { MessageType::CATCH_TRACE_CMD, std::string("catch_trace_cmd") },
6306f6ba60Sopenharmony_ci    { MessageType::SET_DUBAI_DB, std::string("set_dubai_db") },
6406f6ba60Sopenharmony_ci    { MessageType::CATCH_NETWORK_TRAFFIC, std::string("catch_network_traffic") },
6506f6ba60Sopenharmony_ci    { MessageType::GET_NETWORK_TRAFFIC, std::string("get_network_traffic") },
6606f6ba60Sopenharmony_ci    { MessageType::BACK_TO_DESKTOP, std::string("back_to_desk") },
6706f6ba60Sopenharmony_ci    { MessageType::GET_LOW_POWER_FPS, std::string("get_low_power_fps") },
6806f6ba60Sopenharmony_ci    { MessageType::GET_CUR_FPS, std::string("get_cur_fps") },
6906f6ba60Sopenharmony_ci    { MessageType::FPS_STOP, std::string("fps_stop") },
7006f6ba60Sopenharmony_ci    { MessageType::SET_GAME_VIEW, std::string("set_game_view") },
7106f6ba60Sopenharmony_ci};
7206f6ba60Sopenharmony_ci
7306f6ba60Sopenharmony_cienum class CommandType {
7406f6ba60Sopenharmony_ci    CT_N,
7506f6ba60Sopenharmony_ci    CT_PKG,
7606f6ba60Sopenharmony_ci    CT_PID,
7706f6ba60Sopenharmony_ci    CT_OUT,
7806f6ba60Sopenharmony_ci    CT_C,
7906f6ba60Sopenharmony_ci    CT_G,
8006f6ba60Sopenharmony_ci    CT_D,
8106f6ba60Sopenharmony_ci    CT_F,
8206f6ba60Sopenharmony_ci    CT_T,
8306f6ba60Sopenharmony_ci    CT_P,
8406f6ba60Sopenharmony_ci    CT_R,
8506f6ba60Sopenharmony_ci    CT_TTRACE,
8606f6ba60Sopenharmony_ci    CT_SNAPSHOT,
8706f6ba60Sopenharmony_ci    CT_HW,
8806f6ba60Sopenharmony_ci    CT_SESSIONID,
8906f6ba60Sopenharmony_ci    CT_INTERVAL,
9006f6ba60Sopenharmony_ci    CT_NET,
9106f6ba60Sopenharmony_ci    CT_VIEW,
9206f6ba60Sopenharmony_ci    CT_FL,      //帧率限制值
9306f6ba60Sopenharmony_ci    CT_FTL,     //帧间隔限制值,单位ms
9406f6ba60Sopenharmony_ci    CT_GC,
9506f6ba60Sopenharmony_ci    CT_NAV,
9606f6ba60Sopenharmony_ci    CT_O,
9706f6ba60Sopenharmony_ci};
9806f6ba60Sopenharmony_cienum class CommandHelp {
9906f6ba60Sopenharmony_ci    HELP,
10006f6ba60Sopenharmony_ci    VERSION,
10106f6ba60Sopenharmony_ci    SCREEN,
10206f6ba60Sopenharmony_ci    CLEAR,
10306f6ba60Sopenharmony_ci    SERVER,
10406f6ba60Sopenharmony_ci    EDITORSERVER,
10506f6ba60Sopenharmony_ci};
10606f6ba60Sopenharmony_ci
10706f6ba60Sopenharmony_ciconst std::unordered_map<std::string, CommandType> COMMAND_MAP = {
10806f6ba60Sopenharmony_ci    { std::string("-N"), CommandType::CT_N },
10906f6ba60Sopenharmony_ci    { std::string("-PKG"), CommandType::CT_PKG },
11006f6ba60Sopenharmony_ci    { std::string("-PID"), CommandType::CT_PID },
11106f6ba60Sopenharmony_ci    { std::string("-OUT"), CommandType::CT_OUT },
11206f6ba60Sopenharmony_ci    { std::string("-c"), CommandType::CT_C },
11306f6ba60Sopenharmony_ci    { std::string("-g"), CommandType::CT_G },
11406f6ba60Sopenharmony_ci    { std::string("-f"), CommandType::CT_F },
11506f6ba60Sopenharmony_ci    { std::string("-t"), CommandType::CT_T },
11606f6ba60Sopenharmony_ci    { std::string("-p"), CommandType::CT_P },
11706f6ba60Sopenharmony_ci    { std::string("-r"), CommandType::CT_R },
11806f6ba60Sopenharmony_ci    { std::string("-trace"), CommandType::CT_TTRACE },
11906f6ba60Sopenharmony_ci    { std::string("-snapshot"), CommandType::CT_SNAPSHOT },
12006f6ba60Sopenharmony_ci    { std::string("-hw"), CommandType::CT_HW },
12106f6ba60Sopenharmony_ci    { std::string("-d"), CommandType::CT_D },
12206f6ba60Sopenharmony_ci    { std::string("-INTERVAL"), CommandType::CT_INTERVAL },
12306f6ba60Sopenharmony_ci    { std::string("-SESSIONID"), CommandType::CT_SESSIONID },
12406f6ba60Sopenharmony_ci    { std::string("-net"), CommandType::CT_NET },
12506f6ba60Sopenharmony_ci    { std::string("-VIEW"), CommandType::CT_VIEW },
12606f6ba60Sopenharmony_ci    { std::string("-fl"), CommandType::CT_FL },
12706f6ba60Sopenharmony_ci    { std::string("-ftl"), CommandType::CT_FTL },
12806f6ba60Sopenharmony_ci    { std::string("-gc"), CommandType::CT_GC },
12906f6ba60Sopenharmony_ci    { std::string("-nav"), CommandType::CT_NAV },
13006f6ba60Sopenharmony_ci    { std::string("-o"), CommandType::CT_O },
13106f6ba60Sopenharmony_ci};
13206f6ba60Sopenharmony_ci
13306f6ba60Sopenharmony_ciconst std::unordered_map<CommandType, std::string> COMMAND_MAP_REVERSE = {
13406f6ba60Sopenharmony_ci    { CommandType::CT_N, std::string("-N") },
13506f6ba60Sopenharmony_ci    { CommandType::CT_PKG, std::string("-PKG") },
13606f6ba60Sopenharmony_ci    { CommandType::CT_PID, std::string("-PID") },
13706f6ba60Sopenharmony_ci    { CommandType::CT_OUT, std::string("-OUT") },
13806f6ba60Sopenharmony_ci    { CommandType::CT_C, std::string("-c") },
13906f6ba60Sopenharmony_ci    { CommandType::CT_G, std::string("-g") },
14006f6ba60Sopenharmony_ci    { CommandType::CT_F, std::string("-f") },
14106f6ba60Sopenharmony_ci    { CommandType::CT_T, std::string("-t") },
14206f6ba60Sopenharmony_ci    { CommandType::CT_P, std::string("-p") },
14306f6ba60Sopenharmony_ci    { CommandType::CT_R, std::string("-r") },
14406f6ba60Sopenharmony_ci    { CommandType::CT_TTRACE, std::string("-trace") },
14506f6ba60Sopenharmony_ci    { CommandType::CT_SNAPSHOT, std::string("-snapshot") },
14606f6ba60Sopenharmony_ci    { CommandType::CT_HW, std::string("-hw") },
14706f6ba60Sopenharmony_ci    { CommandType::CT_D, std::string("-d") },
14806f6ba60Sopenharmony_ci    { CommandType::CT_INTERVAL, std::string("-INTERVAL") },
14906f6ba60Sopenharmony_ci    { CommandType::CT_SESSIONID, std::string("-SESSIONID") },
15006f6ba60Sopenharmony_ci    { CommandType::CT_NET, std::string("-net") },
15106f6ba60Sopenharmony_ci    { CommandType::CT_VIEW, std::string("-VIEW") },
15206f6ba60Sopenharmony_ci    { CommandType::CT_FL, std::string("-fl") },
15306f6ba60Sopenharmony_ci    { CommandType::CT_FTL, std::string("-ftl") },
15406f6ba60Sopenharmony_ci    { CommandType::CT_GC, std::string("-gc") },
15506f6ba60Sopenharmony_ci    { CommandType::CT_NAV, std::string("-nav") },
15606f6ba60Sopenharmony_ci    { CommandType::CT_O, std::string("-o") },
15706f6ba60Sopenharmony_ci};
15806f6ba60Sopenharmony_ci
15906f6ba60Sopenharmony_ci
16006f6ba60Sopenharmony_ciconst std::unordered_map<CommandHelp, std::string> COMMAND_HELP_MAP = {
16106f6ba60Sopenharmony_ci    { CommandHelp::HELP, std::string("--help") },
16206f6ba60Sopenharmony_ci    { CommandHelp::VERSION, std::string("--version") },
16306f6ba60Sopenharmony_ci    { CommandHelp::SCREEN, std::string("-screen") },
16406f6ba60Sopenharmony_ci    { CommandHelp::CLEAR, std::string("-clear") },
16506f6ba60Sopenharmony_ci    { CommandHelp::SERVER, std::string("-server") },
16606f6ba60Sopenharmony_ci    { CommandHelp::EDITORSERVER, std::string("-editorServer") },
16706f6ba60Sopenharmony_ci};
16806f6ba60Sopenharmony_ci
16906f6ba60Sopenharmony_cienum class TraceStatus {
17006f6ba60Sopenharmony_ci    TRACE_START,
17106f6ba60Sopenharmony_ci    TRACE_FINISH,
17206f6ba60Sopenharmony_ci    TRACE_NO
17306f6ba60Sopenharmony_ci};
17406f6ba60Sopenharmony_ci
17506f6ba60Sopenharmony_cienum class CmdCommand {
17606f6ba60Sopenharmony_ci    HITRACE_1024,
17706f6ba60Sopenharmony_ci    HITRACE_2048,
17806f6ba60Sopenharmony_ci    HITRACE_CMD,
17906f6ba60Sopenharmony_ci    CAPTURE_FILE,
18006f6ba60Sopenharmony_ci    SNAPSHOT,
18106f6ba60Sopenharmony_ci    SERVER,
18206f6ba60Sopenharmony_ci    OHTESTFPS,
18306f6ba60Sopenharmony_ci    RM_FILE,
18406f6ba60Sopenharmony_ci    TASKSET,
18506f6ba60Sopenharmony_ci    PROC_STAT,
18606f6ba60Sopenharmony_ci    HIPROFILER,
18706f6ba60Sopenharmony_ci    PERF,
18806f6ba60Sopenharmony_ci    WRITE_PATH,
18906f6ba60Sopenharmony_ci    HIPROFILER_CMD,
19006f6ba60Sopenharmony_ci    HIPROFILER_PID,
19106f6ba60Sopenharmony_ci    KILL_CMD,
19206f6ba60Sopenharmony_ci    PIDOF_SP,
19306f6ba60Sopenharmony_ci    SERVER_GREP,
19406f6ba60Sopenharmony_ci    EDITOR_SERVER_GREP,
19506f6ba60Sopenharmony_ci    UINPUT_BACK,
19606f6ba60Sopenharmony_ci    TIMESTAMPS,
19706f6ba60Sopenharmony_ci};
19806f6ba60Sopenharmony_ci
19906f6ba60Sopenharmony_ciconst std::unordered_map<CmdCommand, std::string> CMD_COMMAND_MAP = {
20006f6ba60Sopenharmony_ci    { CmdCommand::HITRACE_1024, std::string(
20106f6ba60Sopenharmony_ci        "hitrace --trace_clock mono -t 10 -b 102400 --overwrite idle ace app ohos ability graphic "
20206f6ba60Sopenharmony_ci        "nweb sched freq sync workq multimodalinput > ") },
20306f6ba60Sopenharmony_ci    { CmdCommand::HITRACE_2048, std::string(
20406f6ba60Sopenharmony_ci        "hitrace --trace_clock mono -t 10 -b 204800 --overwrite idle ace app ohos ability graphic "
20506f6ba60Sopenharmony_ci        "nweb sched freq sync workq multimodalinput > ") },
20606f6ba60Sopenharmony_ci    { CmdCommand::HITRACE_CMD, std::string("ps -ef |grep hitrace |grep -v grep") },
20706f6ba60Sopenharmony_ci    { CmdCommand::CAPTURE_FILE, std::string("mkdir -p /data/local/tmp/capture") },
20806f6ba60Sopenharmony_ci    { CmdCommand::SNAPSHOT, std::string("snapshot_display -f ") },
20906f6ba60Sopenharmony_ci    { CmdCommand::SERVER, std::string("SP_daemon -server") },
21006f6ba60Sopenharmony_ci    { CmdCommand::OHTESTFPS, std::string("SP_daemon -ohtestfps 10") },
21106f6ba60Sopenharmony_ci    { CmdCommand::RM_FILE, std::string("rm -rfv /data/local/tmp/") },
21206f6ba60Sopenharmony_ci    { CmdCommand::TASKSET, std::string("taskset -p f ") },
21306f6ba60Sopenharmony_ci    { CmdCommand::PROC_STAT, std::string("chmod o+r /proc/stat") },
21406f6ba60Sopenharmony_ci    { CmdCommand::HIPROFILER, std::string("rm -f /data/local/tmp/hiprofiler_[0-9]*.htrace") },
21506f6ba60Sopenharmony_ci    { CmdCommand::PERF, std::string("rm -f /data/local/tmp/perf_[0-9]*.data") },
21606f6ba60Sopenharmony_ci    { CmdCommand::WRITE_PATH, std::string("mkdir -p /data/local/tmp/smartperf/") },
21706f6ba60Sopenharmony_ci    { CmdCommand::HIPROFILER_CMD, std::string("ps -ef |grep hiprofiler_cmd |grep -v grep") },
21806f6ba60Sopenharmony_ci    { CmdCommand::HIPROFILER_PID, std::string("pidof hiprofiler_cmd") },
21906f6ba60Sopenharmony_ci    { CmdCommand::KILL_CMD, std::string("kill ") },
22006f6ba60Sopenharmony_ci    { CmdCommand::PIDOF_SP, std::string("pidof SP_daemon") },
22106f6ba60Sopenharmony_ci    { CmdCommand::SERVER_GREP, std::string("ps -ef | grep -v grep | grep 'SP_daemon -server'") },
22206f6ba60Sopenharmony_ci    { CmdCommand::EDITOR_SERVER_GREP, std::string("ps -ef | grep -v grep | grep 'SP_daemon -editorServer'") },
22306f6ba60Sopenharmony_ci    { CmdCommand::UINPUT_BACK, std::string("uinput -T -m 600 2760 600 1300 200") },
22406f6ba60Sopenharmony_ci    { CmdCommand::TIMESTAMPS, std::string("timestamps") },
22506f6ba60Sopenharmony_ci};
22606f6ba60Sopenharmony_ci
22706f6ba60Sopenharmony_cienum class DeviceCmd {
22806f6ba60Sopenharmony_ci    SN,
22906f6ba60Sopenharmony_ci    DEVICET_NAME,
23006f6ba60Sopenharmony_ci    BRAND,
23106f6ba60Sopenharmony_ci    VERSION,
23206f6ba60Sopenharmony_ci    ABILIST,
23306f6ba60Sopenharmony_ci    NAME,
23406f6ba60Sopenharmony_ci    MODEL,
23506f6ba60Sopenharmony_ci    FULL_NAME,
23606f6ba60Sopenharmony_ci};
23706f6ba60Sopenharmony_ciconst std::unordered_map<DeviceCmd, std::string> DEVICE_CMD_MAP = {
23806f6ba60Sopenharmony_ci    { DeviceCmd::SN, std::string("param get ohos.boot.sn") },
23906f6ba60Sopenharmony_ci    { DeviceCmd::DEVICET_NAME, std::string("param get ohos.boot.hardware") },
24006f6ba60Sopenharmony_ci    { DeviceCmd::BRAND, std::string("param get const.product.brand") },
24106f6ba60Sopenharmony_ci    { DeviceCmd::VERSION, std::string("param get const.product.software.version") },
24206f6ba60Sopenharmony_ci    { DeviceCmd::ABILIST, std::string("param get const.product.cpu.abilist") },
24306f6ba60Sopenharmony_ci    { DeviceCmd::NAME, std::string("param get const.product.name") },
24406f6ba60Sopenharmony_ci    { DeviceCmd::MODEL, std::string("param get const.product.model") },
24506f6ba60Sopenharmony_ci    { DeviceCmd::FULL_NAME, std::string("param get const.ohos.fullname") },
24606f6ba60Sopenharmony_ci};
24706f6ba60Sopenharmony_ci
24806f6ba60Sopenharmony_cienum class HidumperCmd {
24906f6ba60Sopenharmony_ci    DUMPER_DUBAI_B,
25006f6ba60Sopenharmony_ci    DUMPER_DUBAI_F,
25106f6ba60Sopenharmony_ci    DUMPER_SURFACE,
25206f6ba60Sopenharmony_ci    DUMPER_HEAD,
25306f6ba60Sopenharmony_ci    DUMPER_SCREEN,
25406f6ba60Sopenharmony_ci    DUMPER_A_A,
25506f6ba60Sopenharmony_ci    DUMPER_NAV,
25606f6ba60Sopenharmony_ci    DUMPER_MEM,
25706f6ba60Sopenharmony_ci};
25806f6ba60Sopenharmony_ciconst std::unordered_map<HidumperCmd, std::string> HIDUMPER_CMD_MAP = {
25906f6ba60Sopenharmony_ci    { HidumperCmd::DUMPER_DUBAI_B, std::string("hidumper -s 1213 -a '-b'") },
26006f6ba60Sopenharmony_ci    { HidumperCmd::DUMPER_DUBAI_F, std::string("hidumper -s 1213 -a '-f'") },
26106f6ba60Sopenharmony_ci    { HidumperCmd::DUMPER_SURFACE, std::string("hidumper -s 10 -a surface | grep surface") },
26206f6ba60Sopenharmony_ci    { HidumperCmd::DUMPER_HEAD, std::string(
26306f6ba60Sopenharmony_ci        "hidumper -s AbilityManagerService -a '-a' | grep 'bundle name' | head -n 1") },
26406f6ba60Sopenharmony_ci    { HidumperCmd::DUMPER_SCREEN, std::string("hidumper -s 10 -a screen") },
26506f6ba60Sopenharmony_ci    { HidumperCmd::DUMPER_A_A, std::string("hidumper -s WindowManagerService -a '-a'") },
26606f6ba60Sopenharmony_ci    { HidumperCmd::DUMPER_NAV, std::string("hidumper -s WindowManagerService -a '-w ") },
26706f6ba60Sopenharmony_ci    { HidumperCmd::DUMPER_MEM, std::string("hidumper --mem ") },
26806f6ba60Sopenharmony_ci};
26906f6ba60Sopenharmony_ci
27006f6ba60Sopenharmony_cienum class HisyseventCmd {
27106f6ba60Sopenharmony_ci    HISYS_APP_START,
27206f6ba60Sopenharmony_ci    HISYS_JANK,
27306f6ba60Sopenharmony_ci    HISYS_RESPONSE,
27406f6ba60Sopenharmony_ci    HISYS_COMPLETED,
27506f6ba60Sopenharmony_ci    HISYSEVENT,
27606f6ba60Sopenharmony_ci    HISYS_PID,
27706f6ba60Sopenharmony_ci};
27806f6ba60Sopenharmony_ciconst std::unordered_map<HisyseventCmd, std::string> HISYSEVENT_CMD_MAP = {
27906f6ba60Sopenharmony_ci    { HisyseventCmd::HISYS_APP_START, std::string("hisysevent -r -o PERFORMANCE -n APP_START") },
28006f6ba60Sopenharmony_ci    { HisyseventCmd::HISYS_JANK, std::string("hisysevent -r -o PERFORMANCE -n INTERACTION_JANK") },
28106f6ba60Sopenharmony_ci    { HisyseventCmd::HISYS_RESPONSE, std::string("hisysevent -r -n INTERACTION_RESPONSE_LATENCY") },
28206f6ba60Sopenharmony_ci    { HisyseventCmd::HISYS_COMPLETED, std::string("hisysevent -r -n INTERACTION_COMPLETED_LATENCY") },
28306f6ba60Sopenharmony_ci    { HisyseventCmd::HISYSEVENT, std::string("ps -ef |grep hisysevent") },
28406f6ba60Sopenharmony_ci    { HisyseventCmd::HISYS_PID, std::string("pidof hisysevent") },
28506f6ba60Sopenharmony_ci};
28606f6ba60Sopenharmony_ci}
28706f6ba60Sopenharmony_ci}
28806f6ba60Sopenharmony_ci#endif