Definition at line 8 of file MemoryUsageTest.php.
◆ _deallocateUnusedMemory()
_deallocateUnusedMemory |
( |
| ) |
|
|
protected |
◆ _getAllowedMemoryUsage()
_getAllowedMemoryUsage |
( |
| ) |
|
|
protected |
Retrieve the allowed memory usage in bytes, depending on the environment
- Returns
- int
Definition at line 68 of file MemoryUsageTest.php.
72 return \Magento\TestFramework\Helper\Memory::convertToBytes(
'2M');
◆ setUp()
Definition at line 20 of file MemoryUsageTest.php.
22 if (defined(
'HHVM_VERSION')) {
23 $this->markTestSkipped(
"Test not relevant because no gc in HHVM.");
25 $this->_helper = new \Magento\TestFramework\Helper\Memory(
26 new \
Magento\Framework\Shell(
new \
Magento\Framework\Shell\CommandRenderer())
◆ testAppReinitializationNoMemoryLeak()
testAppReinitializationNoMemoryLeak |
( |
| ) |
|
Test that application reinitialization produces no memory leaks
Definition at line 33 of file MemoryUsageTest.php.
35 $this->markTestSkipped(
'Test fails at Travis. Skipped until MAGETWO-47111');
38 $actualMemoryUsage = $this->_helper->getRealMemoryUsage();
43 $actualMemoryUsage = $this->_helper->getRealMemoryUsage() - $actualMemoryUsage;
44 $this->assertLessThanOrEqual(
48 "Application reinitialization causes the memory leak of %u bytes per %u iterations.",
50 self::APP_REINITIALIZATION_LOOPS
_deallocateUnusedMemory()
const APP_REINITIALIZATION_LOOPS
◆ $_helper
◆ APP_REINITIALIZATION_LOOPS
const APP_REINITIALIZATION_LOOPS = 20 |
Number of application reinitialization iterations to be conducted by tests
Definition at line 13 of file MemoryUsageTest.php.
The documentation for this class was generated from the following file: