-
Notifications
You must be signed in to change notification settings - Fork 2
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
Changed query bars. #3
Conversation
Added click-to-anchor on bars. Added tooltips to bars. Added time and memory bars to Profile Information Changed html output of and added colored labels to Profile Information Changed html output of and added labels to Memory Usage
I added a $marks var to the libraries/joomla/profiler/profiler.php containing the separate mark data. And leaving the creation of the string (sprintf) to the debug plugin. |
@nonumber Awesome! This will help well overall profiling, and brings the debug zone uptodate. One minor issue:
A few last ideas that you could do before I merge the code from this awesome pull request:
Do you wish to do the things above as new commits within this pull request ? |
Re: 2) The way I have it now is that anything that is more than 1.5 times the average is red. And anything less than 2/3 times (= divided by 1.5) is green. between that is orange. I think it should somehow be relative to the total time. Otherwise you will get everything green on fast servers and everything red on slow ones. Then coloring is useless. |
Good point for "2)", even if I have no problem to mark all in red on crappy hostings... :D |
Database queries total time label could btw be colored as well, to attract attention to queries slownesses in the PHP profiling. ;) |
@nonumber : should i merge this pull request or wait ? :-) |
Changed time notation from seconds to ms.
Regarding coloring for total DB time: what should we use as calculation? Probably best to compare it to the total page load time. What is a reasonable percentage? Above 25% = red, below 10% = green? |
Great!
Agree on principle and propose:
|
Done :) |
Great! 👍 Are we now feature-complete ? :) |
Strange: In profile with 7.6 ms queries, it's green as it should. But in top of Queries tab, it's red. |
Think so :) |
On your demo site too: Database queries total: 18.0 ms (GREEN: Ok) |
Yeah, just saw that on my demo. |
…query time label)
Fixed?! |
Yup ! @nonumber That looks now like a really awesome tool. It spots and shows to the developer where the timings hurt most and why in a glance! It will now allow people to improve Joomla and extensions speed massively! I'm now doing a last quick diff peer code review, then will press the merge button and post on tracker for asking for tests. |
Yeah, noticed that on plain Joomla pages too. 40 Queries Logged 13.5 ms, (ORANGE)5 duplicate queries(/ORANGE) |
(edited comment above to orange) |
So if 1 query is used 5 times, and another is used 3 times... is that 2 or 6 or 8 duplicates?! |
In summary it would be a total of 8 I would say. if needed a link on that label could scroll to anchor of first one. |
Hmmm, if 1 query is used twice, then there is 1 duplicate, not 2, right? |
hm, right. So 5 times + 3 times means 4 times + 2 times too much = 6 duplicate queries. But 8 is not incorrect either....Anyway any duplicate should be a warning. Now how much doesn't matter... Main thing is that it's good to make it visible in orange at top. |
How about this? |
Looks great ! Think it's more than time to quick-peer-review source and merge 👍 |
Quick code review looks very fine. While reviewing your very nice cleanups alll over the place, I noticed that function renderBacktrace was not using the formatLink() function which gives the clickable links with debug config in php.ini. Would that also make sense ? |
I'm already merging this great pull request. The renderBacktrace is used in case of PHP errors, so it's not directly related to SQL and profiling tools. We can always add those nice little links later. ;-) |
:) |
…dy merged pull request #3 from nonumber/debug
…t of type int Fixes `Deprecated: preg_split(): Passing null to parameter #3 ($limit) of type int is deprecated in libraries/src/Document/HtmlDocument.php on line 595`
…t of type int (joomla#36775) Fixes `Deprecated: preg_split(): Passing null to parameter #3 ($limit) of type int is deprecated in libraries/src/Document/HtmlDocument.php on line 595`
…esumable-mod-1 [CMS PR 36708] Revert use DateInterval
PHP Deprecated: str_replace(): Passing null to parameter #3 ($subject)
Added click-to-anchor on bars.
Added tooltips to bars.
Added time and memory bars to Profile Information
Changed html output of and added colored labels to Profile Information
Changed html output of and added labels to Memory Usage
See live demo: http://ndev.nl/debug