rename to benchmark_print_summary

This commit is contained in:
c9s 2014-05-17 07:48:57 +08:00
parent f5863a956d
commit e0c67acc61
4 changed files with 4 additions and 3 deletions

View file

@ -48,7 +48,7 @@ double bench_iteration_speed(bench *b) {
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 iterations, ", b->N);
printf("finished in %lf seconds\n", b->end - b->start );

View file

@ -46,6 +46,6 @@ void bench_stop(bench *b);
double bench_iteration_speed(bench *b);
void bench_summary(bench *b);
void bench_print_summary(bench *b);
#endif /* !BENCH_H */

View file

@ -60,3 +60,4 @@
1400284002,2955730.95
1400284062,3701787.14
1400284077,3849171.15
1400284134,3677032.97

1 1400242718 5649455.80
60 1400284002 2955730.95
61 1400284062 3701787.14
62 1400284077 3849171.15
63 1400284134 3677032.97

View file

@ -624,7 +624,7 @@ START_TEST(benchmark_str)
*/
END_BENCHMARK()
bench_summary(&B);
bench_print_summary(&B);
FILE *fp = fopen("bench_str.csv", "a+");
fprintf(fp, "%ld,%.2f\n", unixtime(), B.N / (B.end - B.start));