mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
spit out runtime for graph.php when debugging
git-svn-id: http://www.observium.org/svn/observer/trunk@2930 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -1,5 +1,15 @@
|
||||
<?php
|
||||
|
||||
function utime()
|
||||
{
|
||||
$time = explode(" ", microtime());
|
||||
$usec = (double)$time[0];
|
||||
$sec = (double)$time[1];
|
||||
return $sec + $usec;
|
||||
}
|
||||
|
||||
$start = utime();
|
||||
|
||||
include_once("Net/IPv4.php");
|
||||
|
||||
if (isset($_GET['debug']))
|
||||
@@ -41,4 +51,9 @@ if (isset($config['allow_unauth_graphs']) && $config['allow_unauth_graphs'])
|
||||
|
||||
include("includes/graphs/graph.inc.php");
|
||||
|
||||
$end = utime(); $run = $end - $start;;
|
||||
|
||||
if($debug) { echo("runtime ".$run." secs"); }
|
||||
|
||||
|
||||
?>
|
||||
|
Reference in New Issue
Block a user