artemp/tickets2issues — Issue #523: Add logging that captures wall-clock time for queries, layer rendering and map rendering.
Author: artemp
Created: 2011-10-11 15:22:56+00:00
State: open
Labels: Core_Library

There is currently only one timer in mapnik, and it captures the time it takes to render the entire map in CPU time. Unfortunately that's not a very fair metric because things like database queries that block on the CPU aren't included and they are often the most expensive part of rendering. It would also be really nice to see an elapsed time for each layer's table query as well as for the layer as a whole.

I'm attaching a patch that supplies this functionality by adding two new classes (wall_clock_timer and wall_clock_progress_timer) which are like their boost counterparts but measure wall clock time instead of CPU time. I also applied the timer to get the measurements mentioned above.