Files
librenms-librenms/html/graph.php
T

45 lines
1.2 KiB
PHP
Raw Normal View History

2007-04-03 14:10:23 +00:00
<?php
/**
2016-08-20 12:16:55 +01:00
* LibreNMS
*
2016-08-20 12:16:55 +01:00
* This file is part of LibreNMS.
*
2016-08-20 12:16:55 +01:00
* @package librenms
2013-10-29 05:38:12 +10:00
* @subpackage graphing
* @copyright (C) 2006 - 2012 Adam Armstrong
*/
2015-07-13 20:10:26 +02:00
$start = microtime(true);
2015-07-13 20:10:26 +02:00
if (isset($_GET['debug'])) {
$debug = true;
ini_set('display_errors', 1);
ini_set('display_startup_errors', 0);
ini_set('log_errors', 0);
ini_set('error_reporting', E_ALL);
2016-08-18 20:28:22 -05:00
} else {
2015-07-13 20:10:26 +02:00
$debug = false;
ini_set('display_errors', 0);
ini_set('display_startup_errors', 0);
ini_set('log_errors', 0);
ini_set('error_reporting', 0);
}
$init_modules = array('web', 'graphs');
require realpath(__DIR__ . '/..') . '/includes/init.php';
rrdtool_initialize(false);
require $config['install_dir'] . '/html/includes/graphs/graph.inc.php';
2007-04-03 14:10:23 +00:00
rrdtool_close();
$end = microtime(true);
2015-07-13 20:10:26 +02:00
$run = ($end - $start);
d_echo('<br />Runtime '.$run.' secs');
d_echo('<br />MySQL: Cell '.($db_stats['fetchcell'] + 0).'/'.round(($db_stats['fetchcell_sec'] + 0), 3).'s'.' Row '.($db_stats['fetchrow'] + 0).'/'.round(($db_stats['fetchrow_sec'] + 0), 3).'s'.' Rows '.($db_stats['fetchrows'] + 0).'/'.round(($db_stats['fetchrows_sec'] + 0), 3).'s'.' Column '.($db_stats['fetchcol'] + 0).'/'.round(($db_stats['fetchcol_sec'] + 0), 3).'s');