Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
srp_stopwatch
Everybody should use this.
Wish I had implemented it sooner.
That is all.
Wish I had implemented it sooner.
That is all.
Comments
Suddenly being slammed with performance complaints in http api's and ten minutes or so of implementing srp_stopwatch() throughout and I have real numbers and pointers to places other than where I would've thought the problem lies.
Simple. Invaluable. Underrated until you've got a real problem to solve.
By the way, anyone know of a way to make attach_table() more efficient?
Of course I can still work on tweaking the problem selects but if I can get improvements in the attach then that's improvement in every single request.
I was using our generic attach routine which attaches everything. There's my first problem. I shall be more selective about what I attach as I only need a fraction of the tables for http stuff. That should be a step in the right direction, then if I need more I'll see about implementing your suggestion.
call srp_stopwatch('Reset') call srp_stopwatch('Start','t') call delay( 4) call srp_stopwatch('Stop','t') call srp_stopwatch('ShowAll')
Is this just me? It works for the Show service (curiously, showing less than 4 seconds !?)
Can I be really lazy and ask that I'm just timing one block of code, that the stopwatch name be optional (perhaps defaulted internally) ? ;)
SRPStopwatch.zip
Thanks Don!