From 2071b570536a01f0bf7474270758c6bbade4cc43 Mon Sep 17 00:00:00 2001 From: Joshua Ramon Enslin Date: Tue, 27 Jul 2021 23:44:08 +0200 Subject: [PATCH] Add class MD_STD_DEBUG for debugging and code improvements --- src/MD_STD_DEBUG.php | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/MD_STD_DEBUG.php diff --git a/src/MD_STD_DEBUG.php b/src/MD_STD_DEBUG.php new file mode 100644 index 0000000..9ed7c9a --- /dev/null +++ b/src/MD_STD_DEBUG.php @@ -0,0 +1,35 @@ +'; + echo \microtime(true) - $start . "
"; + echo 'RAM Usage (Peak): ' . \memory_get_peak_usage() . "
"; + echo 'RAM Usage: ' . \memory_get_usage() . "
"; + if ($loadAvg = \sys_getloadavg()) { + echo 'Load avg. (last 1 minute): ' . $loadAvg[0] . '
'; + echo 'Load avg. (last 5 minute): ' . $loadAvg[1] . '
'; + echo 'Load avg. (last 15 minute): ' . $loadAvg[2] . '
'; + } + echo ''; + }, $start); + + } +}