Commit 0021c23d authored by Changpeng Liu's avatar Changpeng Liu Committed by Daniel Verkamp
Browse files

spdk: show total performance result in the ioat_kperf tool



Change-Id: I68010590988fb3e1314922501e45381a029fb9f6
Signed-off-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent a7c6c3cc
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ Building & Usage
    Channel 1 Performance Data 1413 MB/s
    Channel 2 Performance Data 1413 MB/s
    Channel 3 Performance Data 1415 MB/s
    Total Channel Performance Data 5655 MB/s

OS Support
==========
+9 −1
Original line number Diff line number Diff line
@@ -194,6 +194,8 @@ int main(int argc, char *argv[])
	uint32_t transfer_size, order = 0;
	uint64_t total_size, copied = 0;
	uint64_t elapsed_time = 0;
	uint64_t total_time = 0;
	uint64_t perf, total_copied = 0;
	char channel[1024];

	if (check_modules("ioatdma")) {
@@ -346,9 +348,15 @@ int main(int argc, char *argv[])
			return -1;
		}
		assert(elapsed_time != 0);
		perf = copied / elapsed_time;
		total_copied += copied;
		total_time += elapsed_time;
		fprintf(stdout, "Channel %d Performance Data %"PRIu64" MB/s\n",
			i, copied / elapsed_time);
			i, perf);
	}

	if (total_time && threads)
		fprintf(stdout, "Total Channel Performance Data %"PRIu64" MB/s\n",
			total_copied / total_time / threads);
	return 0;
}