X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5b3677b425b9cc6949c1573d59ac772540cbf4b2..8fb33d38a40ca0d377aa543a401d34309514e542:/contrib/benchmarking_code_block/bench.h diff --git a/contrib/benchmarking_code_block/bench.h b/contrib/benchmarking_code_block/bench.h index da60519c64..f458b60612 100644 --- a/contrib/benchmarking_code_block/bench.h +++ b/contrib/benchmarking_code_block/bench.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2014. The SimGrid Team. +/* Copyright (c) 2013-2020. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -61,7 +61,6 @@ static inline void xbt_bench_init(char *tracefile) mybench->output = fopen(tracefile, "a+"); if (mybench->output == NULL) printf("Error while opening the tracefile"); - } /* Initializing StarPU benchmarking */ @@ -72,7 +71,6 @@ static inline void bench_init_starpu(char *tracefile, bench_t *bench) mybench->output = fopen(tracefile, "a+"); if (mybench->output == NULL) printf("Error while opening the tracefile"); - } /* Start benchmarking using macros */ @@ -97,7 +95,7 @@ static inline int bench_end_block(char* block_id) clock_gettime(CLOCK_REALTIME, &mybench->end_time); struct timespec interval; xbt_diff_time(&mybench->start_time, &mybench->end_time, &interval); - fprintf(mybench->output, "%s %lf %lf %lf\n", block_id, xbt_get_time(&mybench->start_time), xbt_get_time(&mybench->end_time), xbt_get_time(&interval)); + fprintf(mybench->output, "%s %f %f %f\n", block_id, xbt_get_time(&mybench->start_time), xbt_get_time(&mybench->end_time), xbt_get_time(&interval)); return 0; } } @@ -133,7 +131,7 @@ static inline int xbt_bench_end(char* block_id) if(mybench->block_id == NULL) strcat (mybench->block_id, "NONAME"); - fprintf(mybench->output, "%s %lf %lf %lf\n", mybench->block_id, xbt_get_time(&mybench->start_time), xbt_get_time(&mybench->end_time), xbt_get_time(&interval)); + fprintf(mybench->output, "%s %f %f %f\n", mybench->block_id, xbt_get_time(&mybench->start_time), xbt_get_time(&mybench->end_time), xbt_get_time(&interval)); return 0; }