Summary of Changes
The time and memory displayed in debug bar (right position) incorrectly includes the usage of debug plugin itself: it's always much bigger than the sum of all timings in Profile tab.
We can't measure 100% correctly but at least should get closer: the most recent profile mark should have right border as closer to right as possible.
See that afterRender
profile mark is not close the the right, hence we have incorrectly logged total time: it includes the time spent in debug plugin itself and we don't see the real state of page generation.
- Debug plugin refactored to
Joomla\Event\SubscriberInterface
- Fixed problem with the time spent for
onAfterRespond
event is not counted.
- Added
afterRespond
profiler mark.
- Fixed problem with the time spent in
onAfterDisconnect
event by debug plugin is included in request time.
- Remove unused
PlgSystemDebug::$totalQueries
variable
- Change
PlgSystemDebug::sqlShowProfiles
to local variable because it's the only usage.
- Custom MemoryCollector to display the peak memory usage before debug data collecting routines.
- Display main memory usage with 3 digits.
Testing Instructions
Apply patch, see more accurate timings in debug. Profile tab marks are now more proportionally to the 100% width.
Actual result BEFORE applying this Pull Request
See issues in Changes above.
Expected result AFTER applying this Pull Request
See issues in Changes above.
Documentation Changes Required
No.
@brianteeman @PhilETaylor Sorry, any news?