this is somewhat tricky.
the most sensical way to do this may be a servlet filter.
but the problem is, when the response returns to the filter, it is already written. so you could write it it, but only at the end of the markup, which does not make sense from a html point of view..
so you have basically three choices that come to my mind:
1) create a Filter, wrap the whole outputStream write it to a buffer and replace a "special string" with the render time. then write the modified buffer to the true outputstream.
2)at the start of the request assign a random/increasing token. save the request duration in a global map/session map. write a javscript that fires after page load that writes out the response time somewhere in the page.
3) fake the whole thing and calculate the response time using javscript/cookies without the server measuring anything.
i have impemented it like 2) and i think its ok.
note this answer is not GAE specific, rather servlet2.x specific. which does not matter.