CC-4265: Keep track of how much memory each request is taking and log if over a threshold
-fixed
This commit is contained in:
parent
ea4567f373
commit
cef3ffb07b
|
@ -11,5 +11,13 @@ class RabbitMqPlugin extends Zend_Controller_Plugin_Abstract
|
|||
Application_Model_RabbitMq::SendMessageToShowRecorder("update_recorder_schedule");
|
||||
}
|
||||
}
|
||||
|
||||
if (memory_get_peak_usage() > 25*pow(2, 20)) {
|
||||
|
||||
Logging::debug("Peak memory usage: "
|
||||
.(memory_get_peak_usage()/1000000)
|
||||
." MB while accessing URI ".$_SERVER['REQUEST_URI']);
|
||||
Logging::debug("Should try to keep memory footprint under 25 MB");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue