New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Added simple time tracking panel #91
Conversation
I don't see a point in built-in measuring |
I think it will. There is a lot of things you can measure - action, handles, beforeRender, render, afterRender, shutdown etc. It could tell in which part of the application life cycle could be a bottle neck. It is also taken from mentioned topic, see http://forum.nette.org/cs/21752-vysledky-mereni-casu-v-debbuger-baru#p148559 |
@stekycz You should use a profiler for this. Measuring it with |
@JanTvrdik Yes, I use profiles when it is needed. I probably understand what you mean. This feature is probably for extra extension only for those who would like to use it. |
@@ -379,7 +379,7 @@ public static function getBar() | |||
{ | |||
if (!self::$bar) { | |||
self::$bar = new Bar; | |||
self::$bar->addPanel(new DefaultBarPanel('time')); | |||
self::$bar->addPanel(new DefaultBarPanel('time'), 'time'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should probably use __CLASS__ . ':time'
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it could be better. I could also use default logic without need of own ID. However I am not sure what is better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Custom ID is better.
That would be cool, however it is not possible because the calls may look like this: Debugger::timer('a');
Debugger::timer('b');
Debugger::timer('b');
Debugger::timer('b');
Debugger::timer('c');
Debugger::timer('a');
Debugger::timer('c'); I see no way how to render tree from this. |
There could be some optional parameter with meaning of depth. If not specified it takes current internal depth. For example: Debugger::timer('a', -1);
Debugger::timer('b');
Debugger::timer('b');
Debugger::timer('b');
Debugger::timer('c');
Debugger::timer('a', +1);
Debugger::timer('c'); |
I'd suggest finishing the current implementation first. Improvements can be done separately :) |
No, there really could not be some magical optional parameter which nobody would use. The biggest problem with the current implementation (assuming all may suggestions are accepted) is that the last two columns have confusing names. One is "since last" and the other is "since last with same name" but named just "delta". But "since last" is also a delta. I have no idea for better column names however. |
9151150
to
00083f3
Compare
Panel |
@dg Do you mean extra extension or extension included in Nette? Current implementation (without time panel) could be updated to use this idea. |
It is developed and maintained by you, so your extension. |
Understood |
When it will be mature and will prove that it is useful and you will be willing to do it, we can merge it to Tracy. |
We will see :-) |
Shows all timer results in time panel for easier time debugging. See http://forum.nette.org/cs/21752-vysledky-mereni-casu-v-debbuger-baru
Questions
Default listener for logging times ofNot related, see [WIP] Added simple time tracking panel #91 (comment)Application
andPresenter
should be in application I guess, right?disable
option exist in NEON configuration (usingCompilerExtension
)?addPanel
as ID to get the panel?Application::onStartup
could be collapsed hiding all times generated during this event (in all its listeners).