First version of #25 implementation, providing memory_get_usage/memory_get_peak_usage/memory_limit
Some checks reported errors
The build has failed.
Some checks reported errors
The build has failed.
This commit is contained in:
19
tests/memory_usage.aer
Normal file
19
tests/memory_usage.aer
Normal file
@@ -0,0 +1,19 @@
|
||||
class Main {
|
||||
|
||||
public function __construct() {
|
||||
$this->displayMem();
|
||||
}
|
||||
|
||||
private function displayMem() {
|
||||
$bytes = memory_get_usage();
|
||||
$peak = memory_get_peak_usage();
|
||||
$limit = memory_limit();
|
||||
var_export($bytes > 0);
|
||||
var_export($peak > 0);
|
||||
var_export($peak >= $bytes);
|
||||
var_export($limit == 0 || $limit > $bytes);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
new Main();
|
4
tests/memory_usage.exp
Normal file
4
tests/memory_usage.exp
Normal file
@@ -0,0 +1,4 @@
|
||||
TRUE
|
||||
TRUE
|
||||
TRUE
|
||||
TRUE
|
Reference in New Issue
Block a user