bdevperf: Fix the period performance print info data.
This patch does the following things: 1 Set the time period 1 second into a global variable, then if we modify that value, we will make sure that we change it in the whole file. 2 Fix the period performance printing data . We should not pass the time period, but we should pass time period * times, since I/Os completed are caculated from the beginning. Change-Id: I1eaaf1655389cbccefdcc879a51fca94028afdcb Signed-off-by: Ziye Yang <ziye.yang@intel.com> Reviewed-on: https://review.gerrithub.io/391421 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
d2374e5e4c
commit
3f1b35f970
@ -62,6 +62,8 @@ static bool g_unmap = false;
|
||||
static int g_queue_depth;
|
||||
static uint64_t g_time_in_usec;
|
||||
static int g_show_performance_real_time = 0;
|
||||
static uint64_t g_show_performance_period_in_usec = 1000000;
|
||||
static uint64_t g_show_performance_period_num = 0;
|
||||
static bool g_run_failed = false;
|
||||
static bool g_shutdown = false;
|
||||
static uint64_t g_shutdown_tsc;
|
||||
@ -581,7 +583,8 @@ performance_dump(int io_time_in_usec)
|
||||
static void
|
||||
performance_statistics_thread(void *arg)
|
||||
{
|
||||
performance_dump(1);
|
||||
g_show_performance_period_num++;
|
||||
performance_dump(g_show_performance_period_num * g_show_performance_period_in_usec);
|
||||
}
|
||||
|
||||
static int
|
||||
@ -660,7 +663,8 @@ bdevperf_run(void *arg1, void *arg2)
|
||||
/* Start a timer to dump performance numbers */
|
||||
g_shutdown_tsc = spdk_get_ticks();
|
||||
if (g_show_performance_real_time) {
|
||||
g_perf_timer = spdk_poller_register(performance_statistics_thread, NULL, 1000000);
|
||||
g_perf_timer = spdk_poller_register(performance_statistics_thread, NULL,
|
||||
g_show_performance_period_in_usec);
|
||||
}
|
||||
|
||||
g_master_core = spdk_env_get_current_core();
|
||||
|
Loading…
Reference in New Issue
Block a user