diff options
author | jokkedk <joakim@jokke.dk> | 2008-04-22 21:11:18 +0000 |
---|---|---|
committer | jokkedk <joakim@jokke.dk> | 2008-04-22 21:11:18 +0000 |
commit | 7b5eb58718604441c7652295eba1a569c38bed0d (patch) | |
tree | 697f6f70dc768ea2e851504a0383bd11f19c3a80 | |
parent | 2716f5952464dc7430aacefa737f004aa822e28e (diff) | |
download | webgrind-7b5eb58718604441c7652295eba1a569c38bed0d.zip webgrind-7b5eb58718604441c7652295eba1a569c38bed0d.tar.gz webgrind-7b5eb58718604441c7652295eba1a569c38bed0d.tar.bz2 |
- Invocation count display code updated for clarity
-rw-r--r-- | index.php | 5 | ||||
-rw-r--r-- | library/Reader.php | 2 |
2 files changed, 3 insertions, 4 deletions
@@ -27,11 +27,10 @@ switch(get('op')){ $dataFile = $files[0]['filename']; } $reader = Webgrind_FileHandler::getInstance()->getTraceReader($dataFile); - $count = $reader->getFunctionCount(); $functions = array(); $shownTotal = 0; - for($i=0;$i<$count;$i++) { + for($i=0;$i<$reader->getFunctionCount();$i++) { $functionInfo = $reader->getFunctionInfo($i,'absolute'); if (!(int)get('hideInternals', 0) || strpos($functionInfo['functionName'], 'php::') === false) { @@ -57,7 +56,7 @@ switch(get('op')){ if($remainingCost<0) break; } - $result['summedInvocationCount'] = $count; + $result['summedInvocationCount'] = $reader->getFunctionCount(); $result['summedRunTime'] = $reader->getHeader('summary'); $result['dataFile'] = $dataFile; $result['invokeUrl'] = $reader->getHeader('cmd'); diff --git a/library/Reader.php b/library/Reader.php index 9067b0d..dbd348c 100644 --- a/library/Reader.php +++ b/library/Reader.php @@ -81,7 +81,7 @@ class Webgrind_Reader * @return int */ function getFunctionCount(){ - return sizeof($this->functionPos); + return count($this->functionPos); } /** |