fix us test failed issue

Signed-off-by: wenlong12 <wenlong12@huawei.com>

Signed-off-by: wenlong12 <wwx1097114@DESKTOP-2021EGU.localdomain>
This commit is contained in:
wenlong12 2022-04-01 16:11:28 +08:00
parent d37f12f8d4
commit a27a1a576c
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)
{