diff --git a/examples/ioat/kperf/README b/examples/ioat/kperf/README index 61bb8e153..cf1e3aa12 100644 --- a/examples/ioat/kperf/README +++ b/examples/ioat/kperf/README @@ -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 ========== diff --git a/examples/ioat/kperf/ioat_kperf.c b/examples/ioat/kperf/ioat_kperf.c index fd2196626..5cf0a5cd5 100644 --- a/examples/ioat/kperf/ioat_kperf.c +++ b/examples/ioat/kperf/ioat_kperf.c @@ -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; }