ZP-671 Log memory and time info. Released under the Affero GNU General Public...

ZP-671 Log memory and time info. Released under the Affero GNU General Public License (AGPL) version 3.
parent 17f2507c
......@@ -298,5 +298,12 @@ include_once('version.php');
ZPush::GetDeviceManager()->Save();
// end gracefully
ZLog::Write(LOGLEVEL_DEBUG, '-------- End');
if (version_compare(phpversion(), '5.4.0') < 0) {
$time_used = number_format(time() - $_SERVER["REQUEST_TIME"], 4);
}
else {
$time_used = number_format(microtime(true) - $_SERVER["REQUEST_TIME_FLOAT"], 4);
}
ZLog::Write(LOGLEVEL_DEBUG, sprintf("-------- End - max mem: %s/%s - time: %s - code: %s", memory_get_peak_usage(false), memory_get_peak_usage(true), $time_used, http_response_code()));
?>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment