bdevperf: prevent multiple performance statistics poller registering
Current implementation allows to run bdevperf with --wait-for-rpc and without -z option. As the result several statistics pollers will be registered. Let's add guardian to prevent this. In the case of multiple test running guardian also will be helpful. Signed-off-by: Denis Nagorny <denisn@nvidia.com> Change-Id: I885f9dba6fa324fe4fbaba104d3058bf9f686c19 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9613 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
279b7babe4
commit
7098e2ed31
@ -1077,7 +1077,7 @@ bdevperf_test(void)
|
||||
|
||||
/* Start a timer to dump performance numbers */
|
||||
g_shutdown_tsc = spdk_get_ticks();
|
||||
if (g_show_performance_real_time) {
|
||||
if (g_show_performance_real_time && !g_perf_timer) {
|
||||
g_perf_timer = SPDK_POLLER_REGISTER(performance_statistics_thread, NULL,
|
||||
g_show_performance_period_in_usec);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user