From 03909b0f38a58f47aec99a72a726ff7a791f5f08 Mon Sep 17 00:00:00 2001 From: Ray Johnston Date: Wed, 20 Jul 2016 08:08:50 -0700 Subject: Fix timing (-st) reporting for muraster and default to no BGPRINT Since -P only turns on BGPRINT (parsing and rendering in different threads), the default bgprint.active needs to be false. The filename and pagenum were only being printed for bgprint.active mode, and the timing.total wasn't being updated for bgprint.active mode. Also missing \n on bgprint.active showtime output. --- source/tools/muraster.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source/tools') diff --git a/source/tools/muraster.c b/source/tools/muraster.c index 3430d297..ed52b01a 100644 --- a/source/tools/muraster.c +++ b/source/tools/muraster.c @@ -979,9 +979,10 @@ static int try_render_page(fz_context *ctx, int pagenum, fz_cookie *cookie, int timing.maxpage = pagenum; timing.maxfilename = filename; } + timing.total += diff + interptime; timing.count ++; - fprintf(stderr, " %dms (interpretation) %dms (rendering) %dms (total)", interptime, diff, diff + interptime); + fprintf(stderr, " %dms (interpretation) %dms (rendering) %dms (total)\n", interptime, diff, diff + interptime); } else { @@ -1320,13 +1321,12 @@ static void drawpage(fz_context *ctx, fz_document *doc, int pagenum) } while (1); + if (showtime) + { + fprintf(stderr, "page %s %d", filename, pagenum); + } if (bgprint.active) { - if (bgprint.active && showtime) - { - fprintf(stderr, "page %s %d", filename, pagenum); - } - bgprint.started = 1; bgprint.solo = 0; bgprint.render = render; @@ -1556,7 +1556,7 @@ int main(int argc, char **argv) fz_var(doc); - bgprint.active = BGPRINT; + bgprint.active = 0; /* set by -P */ min_band_height = MIN_BAND_HEIGHT; max_band_memory = BAND_MEMORY; width = 0; -- cgit v1.2.3