examples/bdevperf: reset the performance period for next run
In the case of running by below commands: ./examples/bdev/bdevperf/bdevperf.py perform_tests This value needs to be reset in each run, otherwise, it shows wrong IOPS in the periodical way with -S parameter. Change-Id: Ib8de7611aa06675d4a16fc3aa130d99b508b7605 Signed-off-by: GangCao <gang.cao@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15960 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
b99b00e595
commit
ed4b89aaab
@ -2209,6 +2209,19 @@ bdevperf_run(void *arg1)
|
||||
bdevperf_construct_job_configs();
|
||||
}
|
||||
|
||||
static void
|
||||
rpc_perform_tests_reset(void)
|
||||
{
|
||||
/* Reset g_run_rc to 0 for the next test run. */
|
||||
g_run_rc = 0;
|
||||
|
||||
/* Reset g_stats to 0 for the next test run. */
|
||||
memset(&g_stats, 0, sizeof(g_stats));
|
||||
|
||||
/* Reset g_show_performance_period_num to 0 for the next test run. */
|
||||
g_show_performance_period_num = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
rpc_perform_tests_cb(void)
|
||||
{
|
||||
@ -2226,11 +2239,7 @@ rpc_perform_tests_cb(void)
|
||||
"bdevperf failed with error %s", spdk_strerror(-g_run_rc));
|
||||
}
|
||||
|
||||
/* Reset g_run_rc to 0 for the next test run. */
|
||||
g_run_rc = 0;
|
||||
|
||||
/* Reset g_stats to 0 for the next test run. */
|
||||
memset(&g_stats, 0, sizeof(g_stats));
|
||||
rpc_perform_tests_reset();
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user