[renderd] Add a munin graph to show how much time renderd spends rendering tiles of various zoom levels

With this graph, it is hopefully possible to see where (i.e. towards which zoomlevel) most of the rendering time goes,
and thus might give some indication where optimisations in the style sheet are best focused at, if performance is an issue.
It useses purely wallclock time and thus does not account for individual resources.
This commit is contained in:
Kai Krueger
2010-09-01 20:19:26 +00:00
parent 665f81d0b7
commit 02a0afa883
4 changed files with 110 additions and 7 deletions

View File

@ -543,7 +543,17 @@ void *render_thread(void * arg)
metaTile tiles(req->xmlname, item->mx, item->my, req->z);
if (maps[i].ok) {
timeval tim;
gettimeofday(&tim, NULL);
long t1=tim.tv_sec*1000+(tim.tv_usec/1000);
ret = render(maps[i].map, req->xmlname, maps[i].prj, item->mx, item->my, req->z, size, tiles);
gettimeofday(&tim, NULL);
long t2=tim.tv_sec*1000+(tim.tv_usec/1000);
syslog(LOG_DEBUG, "DEBUG: DONE TILE %s %d %d-%d %d-%d in %.3lf seconds",
req->xmlname, req->z, item->mx, item->mx+size-1, item->my, item->my+size-1, (t2 - t1)/1000.0);
statsRenderFinish(req->z, t2 - t1);
} else {
syslog(LOG_ERR, "Received request for map layer '%s' which failed to load", req->xmlname);
ret = cmdNotDone;
@ -574,3 +584,4 @@ void *render_thread(void * arg)
}
return NULL;
}