From cbe7c6b81860cf6fc1c188d1f969b46e4442a860 Mon Sep 17 00:00:00 2001 From: Jeffery Fernandez Date: Sat, 22 Mar 2014 15:19:51 +1100 Subject: [PATCH 1/2] Adding Restarts to graph --- opcache.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/opcache.php b/opcache.php index a8bba1b..12e70a8 100644 --- a/opcache.php +++ b/opcache.php @@ -169,6 +169,12 @@ public function getGraphDataSetJson() 0, ); + $dataset['restarts'] = array( + $this->_status['opcache_statistics']['oom_restarts'], + $this->_status['opcache_statistics']['manual_restarts'], + $this->_status['opcache_statistics']['hash_restarts'], + ); + return json_encode($dataset); } @@ -365,7 +371,7 @@ private function _arrayPset(&$array, $key, $value) #graph > form { position: absolute; - right: 110px; + right: 60px; top: -20px; } @@ -505,6 +511,7 @@ function toggleVisible(head, row) { +
@@ -564,6 +571,12 @@ function set_text(t) { ""+ "
Misses"+dataset[t][0]+"
Cache Hits"+dataset[t][1]+"
" ); + } else if (t === "restarts") { + d3.select("#stats").html( + ""+ + ""+ + "
Memory"+dataset[t][0]+"
Manual"+dataset[t][1]+"
Keys"+dataset[t][2]+"
" + ); } } From 7aca02e2011af26145ab0abc055d757bc9dc8c29 Mon Sep 17 00:00:00 2001 From: Jeffery Fernandez Date: Sat, 22 Mar 2014 15:25:51 +1100 Subject: [PATCH 2/2] Fixed un-used variable --- opcache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opcache.php b/opcache.php index 12e70a8..e111e52 100644 --- a/opcache.php +++ b/opcache.php @@ -7,7 +7,7 @@ class OpCacheDataModel { - private $configuration; + private $_configuration; private $_status; private $_d3Scripts = array();