test/nvme: cleanup overhead output
Do not print out the raw TSC totals, and convert the TSC values to nanoseconds so the user does not have to do that manually. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I74d27bcd25522de2d5e34e1b0c609eb184e1b32e Reviewed-on: https://review.gerrithub.io/365266 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
ef3d6d9824
commit
7d93868a5e
@ -437,8 +437,6 @@ work_fn(void)
|
||||
{
|
||||
uint64_t tsc_end;
|
||||
|
||||
printf("Starting work_fn\n");
|
||||
|
||||
/* Allocate a queue pair for each namespace. */
|
||||
if (init_ns_worker_ctx() != 0) {
|
||||
printf("ERROR: init_ns_worker_ctx() failed\n");
|
||||
@ -504,14 +502,16 @@ print_bucket(void *ctx, uint64_t start, uint64_t end, uint64_t count,
|
||||
static void
|
||||
print_stats(void)
|
||||
{
|
||||
printf("g_tsc_submit = %ju\n", g_tsc_submit);
|
||||
printf("g_tsc_complete = %ju\n", g_tsc_complete);
|
||||
printf("g_io_completed = %ju\n", g_io_completed);
|
||||
double divisor = (double)g_tsc_rate / (1000 * 1000 * 1000);
|
||||
|
||||
printf("submit avg, min, max = %8.1f, %ju, %ju\n",
|
||||
(float)g_tsc_submit / g_io_completed, g_tsc_submit_min, g_tsc_submit_max);
|
||||
printf("complete avg, min, max = %8.1f, %ju, %ju\n",
|
||||
(float)g_tsc_complete / g_io_completed, g_tsc_complete_min, g_tsc_complete_max);
|
||||
printf("submit (in ns) avg, min, max = %8.1f, %8.1f, %8.1f\n",
|
||||
(double)g_tsc_submit / g_io_completed / divisor,
|
||||
(double)g_tsc_submit_min / divisor,
|
||||
(double)g_tsc_submit_max / divisor);
|
||||
printf("complete (in ns) avg, min, max = %8.1f, %8.1f, %8.1f\n",
|
||||
(double)g_tsc_complete / g_io_completed / divisor,
|
||||
(double)g_tsc_complete_min / divisor,
|
||||
(double)g_tsc_complete_max / divisor);
|
||||
|
||||
if (!g_enable_histogram) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user