-
New Feature
-
Resolution: Fixed
-
Minor
-
3.7
-
MOODLE_37_STABLE
-
MOODLE_37_STABLE
-
MDL-64543-slow-profile -
The existing profiling stuff is awesome, but generally either only when you have a known bug, or in the case when you can reproduce something. It's not that useful for intermittent performance issues or when there is unknown conditions for the slowness and you want to discover these in production.
So just like slow database logs I want to add a slow page profiling:
1) Have an admin option with a min page load threshold X
2) If this is non zero then always kick off profiling, but only if the page is slower than X do we store it at the end. I believe the overhead of the profiling is quite minimal and it is all in the storage and processing later, we will profile the profiling to confirm this
3) We will still honor the profile blacklist and not start the profiling if it matches. The whitelist wont matter here
4) Generally we only need a one or a small number of bad example profiles, and running this is prod with tons of traffic could make a ton of data, so I am proposing that we only store the slow profile if it wouldn't have been store for any other reason, and it also happens to be slower than all the existing profiles which we have on record for the same url. Typically I would expect to collect a couple instances of a particular bad url, and them maybe one really bad one and then it would probably be hard to beat and we wouldn't store any more.