From e4bfa7df705a4f2e7b837ca72068167d23dac79f Mon Sep 17 00:00:00 2001 From: Shish Date: Fri, 5 Jul 2013 22:22:39 +0100 Subject: [PATCH] further breakdown for page stats --- ext/statsd/main.php | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/ext/statsd/main.php b/ext/statsd/main.php index d9a79679..4a9e4b81 100644 --- a/ext/statsd/main.php +++ b/ext/statsd/main.php @@ -34,13 +34,25 @@ class StatsDInterface extends Extension { public function onPageRequest($event) { $this->_stats("overall"); - if($event->page_matches("post/list")) { - $this->_stats("post-list"); - } - else if($event->page_matches("post/view")) { + if($event->page_matches("post/view")) { # 40% $this->_stats("post-view"); } + else if($event->page_matches("post/list")) { # 30% + $this->_stats("post-list"); + } + else if($event->page_matches("user")) { + $this->_stats("user"); + } + else if($event->page_matches("upload")) { + $this->_stats("upload"); + } + else if($event->page_matches("rss")) { + $this->_stats("rss"); + } else { + #global $_load_start; + #$time = microtime(true) - $_load_start; + #file_put_contents("data/other.log", "{$_SERVER['REQUEST_URI']} $time\n", FILE_APPEND); $this->_stats("other"); }