Commit 7d93868a authored by Jim Harris's avatar Jim Harris
Browse files

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: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: I74d27bcd25522de2d5e34e1b0c609eb184e1b32e

Reviewed-on: https://review.gerrithub.io/365266


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent ef3d6d98
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -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);

	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);
	double divisor = (double)g_tsc_rate / (1000 * 1000 * 1000);

	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;