count_execs is legacy code from adodb anyway... remove another global

This commit is contained in:
Shish
2015-08-02 21:31:55 +01:00
parent ec5d9bb6f4
commit eb246ef1ee
3 changed files with 29 additions and 43 deletions

View File

@ -19,14 +19,14 @@ class StatsDInterface extends Extension {
public static $stats = array();
private function _stats($type) {
global $config, $_shm_event_count, $database, $_shm_query_count, $_shm_load_start;
global $config, $_shm_event_count, $database, $_shm_load_start;
$time = microtime(true) - $_shm_load_start;
StatsDInterface::$stats["shimmie.$type.hits"] = "1|c";
StatsDInterface::$stats["shimmie.$type.time"] = "$time|ms";
StatsDInterface::$stats["shimmie.$type.time-db"] = "{$database->dbtime}|ms";
StatsDInterface::$stats["shimmie.$type.memory"] = memory_get_peak_usage(true)."|c";
StatsDInterface::$stats["shimmie.$type.files"] = count(get_included_files())."|c";
StatsDInterface::$stats["shimmie.$type.queries"] = $_shm_query_count."|c";
StatsDInterface::$stats["shimmie.$type.queries"] = $database->query_count."|c";
StatsDInterface::$stats["shimmie.$type.events"] = $_shm_event_count."|c";
StatsDInterface::$stats["shimmie.$type.cache-hits"] = $database->cache->get_hits()."|c";
StatsDInterface::$stats["shimmie.$type.cache-misses"] = $database->cache->get_misses()."|c";