Skip to content

Commit f0bee2a

Browse files
committed
Ease diagnostic with GHz reporting.
1 parent 295e481 commit f0bee2a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

benchmark/parse.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ int main(int argc, char *argv[]) {
200200
std::cerr << "Could not parse. " << std::endl;
201201
return EXIT_FAILURE;
202202
}
203+
double min_result = *min_element(res.begin(), res.end());
203204
#ifndef SQUASH_COUNTERS
204205
unsigned long total = cy0 + cy1 + cy2;
205206
if (justdata) {
@@ -257,9 +258,9 @@ int main(int argc, char *argv[]) {
257258

258259
printf(" all stages: %.2f cycles per input byte.\n",
259260
(double)total / (iterations * p.size()));
261+
printf("Estimated average frequency: %.3f GHz.\n", (double)total / (iterations * min_result * 1000000000.0));
260262
}
261263
#endif
262-
double min_result = *min_element(res.begin(), res.end());
263264
if (!justdata) {
264265
std::cout << "Min: " << min_result << " bytes read: " << p.size()
265266
<< " Gigabytes/second: " << (p.size()) / (min_result * 1000000000.0)

0 commit comments

Comments
 (0)