Skip to content
This repository has been archived by the owner on Dec 13, 2024. It is now read-only.

Commit

Permalink
MDL-52666 performance: added REQUEST_METHOD in performance_info
Browse files Browse the repository at this point in the history
  • Loading branch information
mikr0 committed Apr 13, 2018
1 parent 2bd2660 commit a0db02b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/moodlelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a0db02b

Please sign in to comment.