Timer Methods#8
Conversation
|
Cool, I like the addition of the timing functions, but I'd suggest perhaps storing the start time of a task in a hash table where the task name is the key? Ie, $this->_startTimes[$task] = $time That way you can nest timings Kenny Katzgrau On Thursday, January 5, 2012 at 11:01 PM, Sam Stewart wrote:
|
|
Excellent point, I guess I assumed a sort of "stack based" call where every start call is matched with a finish call. However, there is a good chance a developer may start another timing call before finishing the last one. I'll make the changes and push. |
|
Alright, I added the array as you suggested. I cleaned up the example file a bit. |
|
@katzgrau / @samstewart I know this is a very old PR but I do like this feature. Seeing as KLogger has evolved a lot since this PR was submitted, this needs to be reworked into the current version of KLogger. @samstewart Up for the task or can someone else rework this? |
|
@onno-vos-dev I like the feature too — would be OK adding it |
|
@katzgrau Unless @samstewart reports here in the next week or so, I'll try to get my hands dirty again on KLogger and implement this feature for the new version of KLogger. |
Hi,
I added some simple timing methods and started work on a lightweight PHP profiler (KProfiler). Anyway, would love to make at least the timing methods available to everyone.
Keep up the good work!
Sam