-
Notifications
You must be signed in to change notification settings - Fork 131
Closed as not planned
Closed as not planned
Copy link
Labels
[Plugin] Performance LabIssue relates to work in the Performance Lab Plugin onlyIssue relates to work in the Performance Lab Plugin only[Plugin] Regenerate Existing ImagesIssues for the Regenerate Existing Images moduleIssues for the Regenerate Existing Images module
Description
Create a new Perflab_Background_Process::memory_exceeded
method to calculate and return the memory used within the background process. This functions checks the total memory used is 90% of the servers memory limit. The boolean returned is also filterable so other developers can set the memory limit.
Acceptance Criteria
- Create a new
memory_exceeded
method thePerflab_Background_Process
class - The method accepts no parameters
- The method returns a boolean
- The total memory limit is calculated by taking
ini_get( 'memory_limit' )
or a fallback value of128M
. This value is then converted to bytes using thewp_convert_hr_to_bytes
function and multiplied by0.9
to calculate 90% of the total memory limit. - The calculated memory limit is tested by checking if it is
>=
to the value returned bymemory_get_usage()
- The boolean value returned is filtered using apply_filters(
perflab_background_process_memory_exceeded
, $return );`
felixarntz
Metadata
Metadata
Assignees
Labels
[Plugin] Performance LabIssue relates to work in the Performance Lab Plugin onlyIssue relates to work in the Performance Lab Plugin only[Plugin] Regenerate Existing ImagesIssues for the Regenerate Existing Images moduleIssues for the Regenerate Existing Images module