diff --git a/tools/hsbench/main.cpp b/tools/hsbench/main.cpp index 9eadf6dd..b5506af3 100644 --- a/tools/hsbench/main.cpp +++ b/tools/hsbench/main.cpp @@ -597,6 +597,17 @@ void displayPerScanResults(const vector> &threads, printf("\n"); } +static +double fastestResult(const vector> &threads) { + double best = threads[0]->results[0].seconds; + for (const auto &t : threads) { + for (const auto &r : t->results) { + best = min(best, r.seconds); + } + } + return best; +} + static u64a byte_size(const vector &corpus_blocks) { u64a total = 0; @@ -650,8 +661,12 @@ void displayResults(const vector> &threads, double blockRate = (double)totalBlocks / (double)totalSecs; printf("Overall block rate: %'0.2f blocks/sec\n", blockRate); - printf("Overall throughput: %'0.2Lf Mbit/sec\n", + printf("Mean throughput: %'0.2Lf Mbit/sec\n", calc_mbps(totalSecs, totalBytes)); + + double lowestScanTime = fastestResult(threads); + printf("Maximum throughput: %'0.2Lf Mbit/sec\n", + calc_mbps(lowestScanTime, bytesPerRun)); printf("\n"); if (display_per_scan) {