intel / intel/hyperscan

Confusing time reported by hsbench

Open
#181 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
C++
Stars
5.5k
Forks
816
Avg merge
4d 21h
Merged PRs (30d)
2

Description

It would be good if hsbench also reports the time spent for a single iteration.

As per the default (of doing 20 iterations) with the following results:
```
Time spent scanning: 5.270 seconds
Corpus size: 177,087,567 bytes (130,957 blocks)
Matches per iteration: 637,380 (3.686 matches/kilobyte)
Overall block rate: 496,998.94 blocks/sec
Mean throughput (overall): 5,376.56 Mbit/sec
Max throughput (per core): 5,386.73 Mbit/sec
```
if you quickly do the match yourself (scanning 177 MB in 5.2 seconds, you would get about 34 MB/sec or 272 Mbit/sec), so a wildly different result ....

By passing in the `-n 1` parameter you get the time for a single loop:
```
Time spent scanning: 0.270 seconds
Corpus size: 177,087,567 bytes (130,957 blocks)
Matches per iteration: 637,380 (3.686 matches/kilobyte)
Overall block rate: 485,596.94 blocks/sec
Mean throughput (overall): 5,253.22 Mbit/sec
Max throughput (per core): 5,253.26 Mbit/sec
```
and then it all makes sense.

So it would be nice to also report the time for a single iteration, so as to avoid confusion.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.