| 78 | } |
| 79 | |
| 80 | void OutputResultOperations(const char *name, const char *operation, bool pc, unsigned long iterations, double timeTaken) |
| 81 | { |
| 82 | // Coverity finding, also see http://stackoverflow.com/a/34509163/608639. |
| 83 | StreamState ss(cout); |
| 84 | |
| 85 | // Coverity finding |
| 86 | if (!iterations) iterations++; |
| 87 | if (timeTaken < 0.0000000001f) timeTaken = 0.000001f; |
| 88 | |
| 89 | cout << "\n<TR><TH>" << name << " " << operation << (pc ? " with precomputation" : ""); |
| 90 | cout << "<TD>" << setprecision(2) << setiosflags(ios::fixed) << (1000*timeTaken/iterations); |
| 91 | if (g_hertz) |
| 92 | cout << "<TD>" << setprecision(2) << setiosflags(ios::fixed) << timeTaken * g_hertz / iterations / 1000000; |
| 93 | |
| 94 | logtotal += log(iterations/timeTaken); |
| 95 | logcount++; |
| 96 | } |
| 97 | |
| 98 | /* |
| 99 | void BenchMark(const char *name, BlockTransformation &cipher, double timeTotal) |
no outgoing calls
no test coverage detected