bug PR-4.4-dev Pending

User tests: Successful: Unsuccessful:

avatar Denitz
Denitz
24 Sep 2021

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.

  1. Debug plugin refactored to Joomla\Event\SubscriberInterface
  2. Fixed problem with the time spent for onAfterRespond event is not counted.
  3. Added afterRespond profiler mark.
  4. Fixed problem with the time spent in onAfterDisconnect event by debug plugin is included in request time.
  5. Remove unused PlgSystemDebug::$totalQueries variable
  6. Change PlgSystemDebug::sqlShowProfiles to local variable because it's the only usage.
  7. Custom MemoryCollector to display the peak memory usage before debug data collecting routines.
  8. 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.

4e191ed 24 Sep 2021 avatar start
avatar Denitz Denitz - open - 24 Sep 2021
avatar Denitz Denitz - change - 24 Sep 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 Sep 2021
Category Libraries Front End Plugins
avatar Denitz Denitz - change - 24 Sep 2021
Labels Added: ?
avatar Denitz Denitz - change - 24 Sep 2021
The description was changed
avatar Denitz Denitz - edited - 24 Sep 2021
08e4b04 24 Sep 2021 avatar cs
a1d274a 24 Sep 2021 avatar cs
avatar Denitz Denitz - change - 22 Feb 2022
Title
[4.0] Invalid timings in debug plugin
[4.1] Invalid timings in debug plugin
avatar Denitz Denitz - edited - 22 Feb 2022
avatar Denitz Denitz - change - 22 Feb 2022
Labels Added: Conflicting Files ?
Removed: ?
avatar Denitz
Denitz - comment - 22 Feb 2022

@brianteeman @PhilETaylor Sorry, any news?

d61018d 23 Feb 2022 avatar fix
avatar Denitz Denitz - change - 23 Feb 2022
Labels Removed: Conflicting Files
avatar joomla-cms-bot joomla-cms-bot - change - 23 Feb 2022
Category Libraries Front End Plugins Front End Plugins
avatar Denitz
Denitz - comment - 23 Feb 2022

@Fedik I restored original positions of onAjaxDebug, isAuthorisedDisplayDebug methods in the file.

3f63817 25 May 2022 avatar fix
avatar HLeithner
HLeithner - comment - 27 Jun 2022

This pull request has automatically rebased to 4.2-dev.

avatar joomla-bot
joomla-bot - comment - 27 Jun 2022

This pull requests has been automatically converted to the PSR-12 coding standard.

avatar HLeithner HLeithner - change - 27 Jun 2022
Labels Added: ?
avatar Denitz Denitz - change - 2 Jul 2022
Labels Added: ?
avatar Denitz Denitz - change - 27 Mar 2023
Labels Removed: ? ?
avatar Denitz Denitz - change - 27 Mar 2023
Labels Added: ?
avatar Denitz Denitz - change - 27 Mar 2023
Labels Added: PR-4.3-dev
Removed: ?
avatar laoneo laoneo - change - 9 Jun 2023
Labels Added: bug
Removed: ?
avatar laoneo
laoneo - comment - 9 Jun 2023

Can you fix the conflicts here?

avatar obuisard obuisard - change - 9 Jun 2023
Title
[4.1] Invalid timings in debug plugin
[4.4] Invalid timings in debug plugin
avatar obuisard obuisard - edited - 9 Jun 2023
avatar Denitz Denitz - change - 12 Jun 2023
Labels Added: PR-4.4-dev
Removed: PR-4.3-dev
avatar Denitz
Denitz - comment - 16 Jun 2023

@laoneo Please restart drone, smth is wrong with the tests and I can't find any relationship with the code itself.

avatar Denitz
Denitz - comment - 17 Aug 2023

Sorry, still weird issue with databases in drone

avatar MacJoom MacJoom - close - 11 Sep 2023
avatar MacJoom MacJoom - merge - 11 Sep 2023
avatar MacJoom MacJoom - change - 11 Sep 2023
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-09-11 06:56:13
Closed_By MacJoom

Add a Comment

Login with GitHub to post a comment