MDL-52666 performance: added REQUEST_METHOD in performance_info

This commit is contained in:
Charles YVANES 2018-04-13 10:10:06 +02:00
parent 2bd2660751
commit a0db02bf7f

View File

@ -9101,6 +9101,9 @@ function get_performance_info() {
$info['html'] .= '<li class="timeused col-sm-4">'.$info['realtime'].' secs</li> ';
$info['txt'] .= 'time: '.$info['realtime'].'s ';
// GET/POST (or NULL if $_SERVER['REQUEST_METHOD'] is undefined) is useful for txt logged information.
$info['txt'] .= 'method: ' . ($_SERVER['REQUEST_METHOD'] ?? "NULL") . ' ';
if (function_exists('memory_get_usage')) {
$info['memory_total'] = memory_get_usage();
$info['memory_growth'] = memory_get_usage() - $PERF->startmemory;