mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
hsbench: output max throughput result
This commit is contained in:
parent
9acda484fe
commit
85358e0ad0
@ -597,6 +597,17 @@ void displayPerScanResults(const vector<unique_ptr<ThreadContext>> &threads,
|
|||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static
|
||||||
|
double fastestResult(const vector<unique_ptr<ThreadContext>> &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
|
static
|
||||||
u64a byte_size(const vector<DataBlock> &corpus_blocks) {
|
u64a byte_size(const vector<DataBlock> &corpus_blocks) {
|
||||||
u64a total = 0;
|
u64a total = 0;
|
||||||
@ -650,8 +661,12 @@ void displayResults(const vector<unique_ptr<ThreadContext>> &threads,
|
|||||||
|
|
||||||
double blockRate = (double)totalBlocks / (double)totalSecs;
|
double blockRate = (double)totalBlocks / (double)totalSecs;
|
||||||
printf("Overall block rate: %'0.2f blocks/sec\n", blockRate);
|
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));
|
calc_mbps(totalSecs, totalBytes));
|
||||||
|
|
||||||
|
double lowestScanTime = fastestResult(threads);
|
||||||
|
printf("Maximum throughput: %'0.2Lf Mbit/sec\n",
|
||||||
|
calc_mbps(lowestScanTime, bytesPerRun));
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
if (display_per_scan) {
|
if (display_per_scan) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user