1 /* 2 * Copyright (C) 2021 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 #ifndef CONTROL_CALL_CMD_H 16 #define CONTROL_CALL_CMD_H 17 #include <iostream> 18 #include <fstream> 19 #include <string> 20 #include <vector> 21 namespace OHOS { 22 namespace SmartPerf { 23 class ControlCallCmd { 24 public: 25 double ColdStart(std::vector<std::string> v); 26 double ColdStartHM(std::vector<std::string> v); 27 double HotStart(std::vector<std::string> v); 28 double CompleteTime(); 29 double ResponseTime(); 30 static std::string SlideFPS(std::vector<std::string> v); 31 static std::string SlideFps(std::vector<std::string> v); 32 double PageFps(); 33 double StartFrameFps(std::vector<std::string> v); 34 std::string GetResult(int argc, std::vector<std::string> v); 35 private: 36 bool isOhTest = false; 37 std::string result = ""; 38 int ohType = 5; 39 int typeName = 2; 40 double time = 0.0; 41 double noNameType = -1.0; 42 }; 43 } 44 } 45 #endif // SMARTPERF_COMMAND_H