MemoryPeakUsageProcessor extends AbstractMemoryProcessor
Memory peak usage processor methods.
Table of Contents
Properties
- $formatSize : bool
- Whether the size is formatted, e.g. in megabytes
- $realMemoryUsage : bool
- Allocated memory usage type to use If set, the real size of memory allocated from system is used.
Methods
- __construct() : mixed
- Constructs this log processor
- getFormatSize() : bool
- Returns whether size should be formatted
- getRealMemoryUsage() : bool
- Returns the allocated memory usage type
- processLogRecord() : LogRecord
- Processes a log record and adds memory peak usage information.
- setFormatSize() : mixed
- Sets whether size should be formatted
- setRealMemoryUsage() : mixed
- Sets the allocated memory usage type
Properties
$formatSize
Whether the size is formatted, e.g. in megabytes
        protected
            bool
    $formatSize
     = true
    
    
    
    Tags
$realMemoryUsage
Allocated memory usage type to use If set, the real size of memory allocated from system is used.
        protected
            bool
    $realMemoryUsage
     = true
        Otherwise the memory used by emalloc() is used.
Tags
Methods
__construct()
Constructs this log processor
    public
                    __construct([array<string|int, mixed> $options = [] ]) : mixed
    Parameters
- $options : array<string|int, mixed> = []
- 
                    Configuration options - depends on the actual processor 
Tags
getFormatSize()
Returns whether size should be formatted
    public
                    getFormatSize() : bool
    Return values
boolgetRealMemoryUsage()
Returns the allocated memory usage type
    public
                    getRealMemoryUsage() : bool
    Return values
boolprocessLogRecord()
Processes a log record and adds memory peak usage information.
    public
                    processLogRecord(LogRecord $logRecord) : LogRecord
    Parameters
- $logRecord : LogRecord
- 
                    The log record to process 
Tags
Return values
LogRecord —The processed log record with additional data
setFormatSize()
Sets whether size should be formatted
    public
                    setFormatSize(bool $formatSize) : mixed
    Parameters
- $formatSize : bool
setRealMemoryUsage()
Sets the allocated memory usage type
    public
                    setRealMemoryUsage(bool $realMemoryUsage) : mixed
    Parameters
- $realMemoryUsage : bool
- 
                    Which allocated memory type to use