From 02c22aa772338b24fc5797f57e584e428230e563 Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Fri, 7 Jun 2019 09:49:51 +0200 Subject: add clocking --- test/monniaux/tiff-4.0.10/ppm2tiff.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/monniaux/tiff-4.0.10/ppm2tiff.c b/test/monniaux/tiff-4.0.10/ppm2tiff.c index 6b4539ec..4fcee53e 100644 --- a/test/monniaux/tiff-4.0.10/ppm2tiff.c +++ b/test/monniaux/tiff-4.0.10/ppm2tiff.c @@ -24,6 +24,10 @@ // VERIMAG #define _POSIX_C_SOURCE 2 +#define VERIMAG 1 +#ifdef VERIMAG +#include "../clock.h" +#endif #include "tif_config.h" @@ -277,6 +281,10 @@ main(int argc, char* argv[]) TIFFSetField(out, TIFFTAG_YRESOLUTION, resolution); TIFFSetField(out, TIFFTAG_RESOLUTIONUNIT, RESUNIT_INCH); } +#ifdef VERIMAG + clock_prepare(); + clock_start(); +#endif for (row = 0; row < h; row++) { if (fread(buf, linebytes, 1, in) != 1) { fprintf(stderr, "%s: scanline %lu: Read error.\n", @@ -286,6 +294,10 @@ main(int argc, char* argv[]) if (TIFFWriteScanline(out, buf, row, 0) < 0) break; } +#ifdef VERIMAG + clock_stop(); + print_total_clock(); +#endif (void) TIFFClose(out); if (buf) _TIFFfree(buf); -- cgit