Skip to content

Commit

Permalink
New staged changes
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Jun 11, 2020
1 parent 12ad7d2 commit 87e3c1d
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/pconvert/pconvert.c
Expand Up @@ -852,7 +852,7 @@ ERROR_T pbenchmark(int argc, char **argv) {
#define ALGORITHMS_SIZE 5
#define COMPRESSION_SIZE 3

struct benchmark benchmark;
struct benchmark benchmark, benchmark_total = { 0, 0, 0};
size_t index, index_j, index_k, index_c;
float time, result, total = 0.0f;
char label[128];
Expand Down Expand Up @@ -924,13 +924,25 @@ ERROR_T pbenchmark(int argc, char **argv) {
benchmark.write_png_time * 1000.0f
);
}
benchmark_total.blend_time += benchmark.blend_time;
benchmark_total.read_png_time += benchmark.read_png_time;
benchmark_total.write_png_time += benchmark.read_png_time;
printf("\n");
}
}
printf("\n");
}

printf("%-42s %0.2fms\n", "total_execution", total * 1000.0f);
printf("%-42s %0.2fms", "total_execution", total * 1000.0f);
if(details == TRUE) {
printf(
" (blend %0.2fms, read %0.2fms, write %0.2fms)",
benchmark_total.blend_time * 1000.0f,
benchmark_total.read_png_time * 1000.0f,
benchmark_total.write_png_time * 1000.0f
);
}
printf("\n");

NORMAL;
}
Expand Down

0 comments on commit 87e3c1d

Please sign in to comment.