line |
true |
false |
branch |
89
|
0 |
0 |
timer->tv_usec = end.tv_usec + (end.tv_usec >= timer->tv_usec ? 0 : 1000000 ) - timer->tv_usec; |
134
|
0 |
0 |
if (!context) return 0; |
137
|
0 |
0 |
for (i = 0; i < count; i++) rhash_update(context, message, msg_size); |
163
|
0 |
0 |
if (hash_id & (RHASH_WHIRLPOOL | RHASH_SNEFRU128 | RHASH_SNEFRU256 | RHASH_SHA3_224 | RHASH_SHA3_256 | RHASH_SHA3_384 | RHASH_SHA3_512)) { |
165
|
0 |
0 |
} else if (hash_id & (RHASH_GOST94 | RHASH_GOST94_CRYPTOPRO | RHASH_SHA384 | RHASH_SHA512)) { |
170
|
0 |
0 |
if (!hash_name) hash_name = ""; /* benchmarking several hashes*/ |
172
|
0 |
0 |
for (i = 0; i < (int)sizeof(message); i++) message[i] = i & 0xff; |
174
|
0 |
0 |
for (j = 0; j < rounds; j++) { |
181
|
0 |
0 |
if ((flags & (RHASH_BENCHMARK_QUIET | RHASH_BENCHMARK_RAW)) == 0) { |
189
|
0 |
0 |
if (flags & RHASH_BENCHMARK_CPB) { |
195
|
0 |
0 |
for (i = 0; i < 200; i++) { |
205
|
0 |
0 |
c1 = (unsigned int)(c1 > cy1 ? cy1 : c1); |
206
|
0 |
0 |
c2 = (unsigned int)(c2 > cy2 ? cy2 : c2); |
212
|
0 |
0 |
if (flags & RHASH_BENCHMARK_RAW) { |
216
|
0 |
0 |
if (flags & RHASH_BENCHMARK_CPB) fprintf(output, "\t%.2f", cpb); |
222
|
0 |
0 |
if (flags & RHASH_BENCHMARK_CPB) fprintf(output, ", CPB=%.2f", cpb); |