Yeah, that’s it. If you have any specific questions I’d be happy to answer. Otherwise I’d say just take DrawTimer and DrawLocker and use them - I think other people have done that. In each module you want to time you just put that code in there (or the equivilent, if you already override draw.
And you can see in each module I also define a static draw timer:
static DrawTimer drawTimer("LFN");
The idea is that the DrawTimer object builds up averages of many runs, and the DrawLocker lets it now when the draw starts and stops. Every now and then it prints some stats to the log.
Oh, and no there isn’t any more documentation that what’s in the source code comments. Looking at the code (for the firs time in a really long time!) I see there isn’t much code. DrawTimer is pretty simple, and I just needed Sqtime to get a high resolution time on windows, as the normal timer resolution is terrible. It’s also extremely simple - should be easy to figure out if you want.
SqTime is super ancient - I wrote it to measure CPU usage of my first module, back in the early Rack 0.6 days.