!61 fix us test failed issue

Merge pull request !61 from wenlong_12/master
This commit is contained in:
openharmony_ci 2022-04-01 09:33:43 +00:00 committed by Gitee
commit 2f8f9d59e9
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 20 additions and 0 deletions

View File

@ -59,6 +59,10 @@ config("hiperf_inner_config") {
]
}
if (product_name == "Hi3516DV300") {
defines += [ "LITTLE_MEMORY" ]
}
if (hiperf_check_time) {
defines += [ "HIPERF_DEBUG_TIME" ]
}

View File

@ -228,7 +228,11 @@ public:
static constexpr uint64_t DEFAULT_SAMPLE_PERIOD = 1;
static constexpr uint64_t DEFAULT_TIMEOUT = 10 * 1000;
static constexpr size_t MIN_BUFFER_SIZE = 64 * 1024 * 1024;
#ifdef LITTLE_MEMORY
static constexpr size_t MAX_BUFFER_SIZE = 128 * 1024 * 1024;
#else
static constexpr size_t MAX_BUFFER_SIZE = 256 * 1024 * 1024;
#endif
static constexpr size_t BUFFER_LOW_LEVEL = 10 * 1024 * 1024;
static constexpr size_t BUFFER_CRITICAL_LEVEL = 5 * 1024 * 1024;

View File

@ -129,6 +129,18 @@ HWTEST_F(SubCommandRecordTest, StopSecondsMaxErr, TestSize.Level1)
TestRecordCommand(opt, false);
}
// system wide
HWTEST_F(SubCommandRecordTest, SystemWide, TestSize.Level1)
{
TestRecordCommand("-d 2 -a ", true, false);
}
// exclude hiperf
HWTEST_F(SubCommandRecordTest, ExcludePerf, TestSize.Level1)
{
TestRecordCommand("-d 2 -a --exclude-hiperf ", true, false);
}
// select cpu
HWTEST_F(SubCommandRecordTest, SelectCpu, TestSize.Level1)
{