aboutsummaryrefslogtreecommitdiffstats
path: root/checks
diff options
context:
space:
mode:
authorlloyd <[email protected]>2006-11-12 05:12:09 +0000
committerlloyd <[email protected]>2006-11-12 05:12:09 +0000
commitff09684721049b11e1b8cd735d41e15b7cea24c3 (patch)
tree3adbd6eacdfb06e5471afbbe2ed0c837c81af5a3 /checks
parent47158578e6da8b13a3016f2160c9c34ab8f7632a (diff)
Decide to print ms/op or ops/second at runtime instead of compile time.
Diffstat (limited to 'checks')
-rw-r--r--checks/pk_bench.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/checks/pk_bench.cpp b/checks/pk_bench.cpp
index 875485944..6cb1ee4d5 100644
--- a/checks/pk_bench.cpp
+++ b/checks/pk_bench.cpp
@@ -264,11 +264,10 @@ void print_result(bool html, u32bit runs, u64bit clocks_used,
{
std::cout << " <TR><TH>" << algo_name << " (" << op << ") <TH>";
-#if PRINT_MS_PER_OP
- std::cout << mseconds_per_run;
-#else
- std::cout << runs_per_sec;
-#endif
+ if(PRINT_MS_PER_OP)
+ std::cout << mseconds_per_run;
+ else
+ std::cout << runs_per_sec;
std::cout << std::endl;
}
@@ -279,11 +278,10 @@ void print_result(bool html, u32bit runs, u64bit clocks_used,
std::cout.setf(std::ios::fixed, std::ios::floatfield);
std::cout.precision(2);
-#if PRINT_MS_PER_OP
- std::cout << mseconds_per_run << " ms / " << op << std::endl;
-#else
- std::cout << runs_per_sec << " ops / second (" << op << ")" << std::endl;
-#endif
+ if(PRINT_MS_PER_OP)
+ std::cout << mseconds_per_run << " ms / " << op << std::endl;
+ else
+ std::cout << runs_per_sec << " ops / second (" << op << ")" << std::endl;
}
}