rename to benchmark_print_summary
This commit is contained in:
parent
f5863a956d
commit
e0c67acc61
4 changed files with 4 additions and 3 deletions
|
@ -48,7 +48,7 @@ double bench_iteration_speed(bench *b) {
|
||||||
return b->N / (b->end - b->start);
|
return b->N / (b->end - b->start);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bench_summary(bench *b) {
|
void bench_print_summary(bench *b) {
|
||||||
printf("%ld runs, ", b->R);
|
printf("%ld runs, ", b->R);
|
||||||
printf("%ld iterations, ", b->N);
|
printf("%ld iterations, ", b->N);
|
||||||
printf("finished in %lf seconds\n", b->end - b->start );
|
printf("finished in %lf seconds\n", b->end - b->start );
|
||||||
|
|
|
@ -46,6 +46,6 @@ void bench_stop(bench *b);
|
||||||
|
|
||||||
double bench_iteration_speed(bench *b);
|
double bench_iteration_speed(bench *b);
|
||||||
|
|
||||||
void bench_summary(bench *b);
|
void bench_print_summary(bench *b);
|
||||||
|
|
||||||
#endif /* !BENCH_H */
|
#endif /* !BENCH_H */
|
||||||
|
|
|
@ -60,3 +60,4 @@
|
||||||
1400284002,2955730.95
|
1400284002,2955730.95
|
||||||
1400284062,3701787.14
|
1400284062,3701787.14
|
||||||
1400284077,3849171.15
|
1400284077,3849171.15
|
||||||
|
1400284134,3677032.97
|
||||||
|
|
|
|
@ -624,7 +624,7 @@ START_TEST(benchmark_str)
|
||||||
*/
|
*/
|
||||||
END_BENCHMARK()
|
END_BENCHMARK()
|
||||||
|
|
||||||
bench_summary(&B);
|
bench_print_summary(&B);
|
||||||
|
|
||||||
FILE *fp = fopen("bench_str.csv", "a+");
|
FILE *fp = fopen("bench_str.csv", "a+");
|
||||||
fprintf(fp, "%ld,%.2f\n", unixtime(), B.N / (B.end - B.start));
|
fprintf(fp, "%ld,%.2f\n", unixtime(), B.N / (B.end - B.start));
|
||||||
|
|
Loading…
Reference in a new issue