log time spent waiting for database queries

This commit is contained in:
Shish
2014-11-26 13:09:22 +00:00
parent 1c60942730
commit 4721d666cd
3 changed files with 17 additions and 3 deletions

View File

@ -23,6 +23,7 @@ class StatsDInterface extends Extension {
$time = microtime(true) - $_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"] = $_execs."|c";