bdevperf: test time wrong time fix

spdk_bdevperf_shutdown_cb computed total time after the
bdevperf_test_done call. It's wrong. Let's get
g_shutdown_tsc delta when it is really needed.

Signed-off-by: Denis Nagorny <denisn@nvidia.com>
Change-Id: Ic4421305b16277af874008e293da8cb121c0244a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9598
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
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:
Denis Nagorny 2021-09-23 21:00:29 +03:00 committed by Tomasz Zawadzki
parent 00d587140f
commit d42045b2af

View File

@ -389,6 +389,7 @@ bdevperf_test_done(void *ctx)
}
if (g_shutdown) {
g_shutdown_tsc = spdk_get_ticks() - g_shutdown_tsc;
g_time_in_usec = g_shutdown_tsc * 1000000 / spdk_get_ticks_hz();
printf("Received shutdown signal, test time was about %.6f seconds\n",
(double)g_time_in_usec / 1000000);
@ -1925,8 +1926,6 @@ spdk_bdevperf_shutdown_cb(void)
return;
}
g_shutdown_tsc = spdk_get_ticks() - g_shutdown_tsc;
/* Iterate jobs to stop all I/O */
TAILQ_FOREACH_SAFE(job, &g_bdevperf.jobs, link, tmp) {
spdk_thread_send_msg(job->thread, _bdevperf_job_drain, job);