mirror of
https://gitee.com/openharmony/developtools_profiler
synced 2024-11-27 00:51:47 +00:00
commit
737a9faee6
@ -300,42 +300,6 @@ HWTEST_F(SPdaemonTest, StopTestCase, TestSize.Level1)
|
||||
EXPECT_EQ(flag, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: ProfilerFpsTestCase
|
||||
* @tc.desc: Test ProfilerFps
|
||||
* @tc.type: FUNC
|
||||
*/
|
||||
HWTEST_F(SPdaemonTest, ProfilerFpsTestCase, TestSize.Level1)
|
||||
{
|
||||
ProfilerFPS &profiler = ProfilerFPS::GetInstance();
|
||||
std::string packName = "ohos.samples.ecg";
|
||||
int sectionsNum = 10;
|
||||
FpsInfoProfiler fpsInfoResult;
|
||||
int nums = 10;
|
||||
int printCount = 10;
|
||||
long long msStartTime = 0;
|
||||
int numb = 20;
|
||||
long long harTime = 0;
|
||||
|
||||
profiler.GetResultFPS(sectionsNum);
|
||||
profiler.CalcFpsAndJitters();
|
||||
profiler.GetSectionsFps(fpsInfoResult, nums);
|
||||
profiler.GetSectionsPrint(printCount, msStartTime, numb, harTime);
|
||||
|
||||
std::string cmd = "SP_daemon -profilerfps 10";
|
||||
std::string result = "";
|
||||
bool flag = false;
|
||||
auto ret = SPUtils::LoadCmd(cmd, result);
|
||||
std::string::size_type strOne = result.find("set");
|
||||
std::string::size_type strTwo = result.find("success");
|
||||
if ((strOne != result.npos) && (strTwo != result.npos)) {
|
||||
flag = true;
|
||||
}
|
||||
|
||||
EXPECT_EQ(ret, true);
|
||||
EXPECT_EQ(flag, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: ScreenTestCase
|
||||
* @tc.desc: Test Screen
|
||||
|
Loading…
Reference in New Issue
Block a user