MemoryDataCollector.
@author Fabien Potencier <fabien@symfony.com>
Expanded class hierarchy of MemoryDataCollector
class MemoryDataCollector extends DataCollector {
/**
* {@inheritdoc}
*/
public function collect(Request $request, Response $response, \Exception $exception = null) {
$this->data = array(
'memory' => memory_get_peak_usage(true),
);
}
/**
* Gets the memory.
*
* @return integer The memory
*/
public function getMemory() {
return $this->data['memory'];
}
/**
* {@inheritdoc}
*/
public function getName() {
return 'memory';
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DataCollector:: |
protected | property | ||
DataCollector:: |
public | function | ||
DataCollector:: |
public | function | ||
MemoryDataCollector:: |
public | function |
Collects data for the given Request and Response. Overrides DataCollectorInterface:: |
|
MemoryDataCollector:: |
public | function | Gets the memory. | |
MemoryDataCollector:: |
public | function |
Returns the name of the collector. Overrides DataCollectorInterface:: |