summaryrefslogtreecommitdiffstats
path: root/system/core/Benchmark.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-10-27 13:28:51 +0200
committerAndrey Andreev <narf@bofh.bg>2012-10-27 13:28:51 +0200
commit3e9d2b8ae82948de3c83bd5a50151949f6e6ca90 (patch)
tree8dcf5ec82b53b67ff43967b77a806d8a0a4fadc3 /system/core/Benchmark.php
parent7d753464d13f3a3326a1679226127570cc0c498f (diff)
Docblock improvements
Diffstat (limited to 'system/core/Benchmark.php')
-rw-r--r--system/core/Benchmark.php32
1 files changed, 18 insertions, 14 deletions
diff --git a/system/core/Benchmark.php b/system/core/Benchmark.php
index 2fabdf46e..f94db2721 100644
--- a/system/core/Benchmark.php
+++ b/system/core/Benchmark.php
@@ -26,7 +26,7 @@
*/
/**
- * CodeIgniter Benchmark Class
+ * Benchmark Class
*
* This class enables you to mark points and calculate the time difference
* between them. Memory consumption can also be displayed.
@@ -40,21 +40,19 @@
class CI_Benchmark {
/**
- * List of all benchmark markers and when they were added
+ * List of all benchmark markers
*
- * @var array
+ * @var array
*/
- public $marker = array();
-
- // --------------------------------------------------------------------
+ public $marker = array();
/**
* Set a benchmark marker
*
* Multiple calls to this function can be made so that several
- * execution points can be timed
+ * execution points can be timed.
*
- * @param string $name name of the marker
+ * @param string $name Marker name
* @return void
*/
public function mark($name)
@@ -65,6 +63,8 @@ class CI_Benchmark {
// --------------------------------------------------------------------
/**
+ * Elapsed time
+ *
* Calculates the time difference between two marked points.
*
* If the first parameter is empty this function instead returns the
@@ -72,10 +72,13 @@ class CI_Benchmark {
* execution time to be shown in a template. The output class will
* swap the real value for this variable.
*
- * @param string a particular marked point
- * @param string a particular marked point
- * @param integer the number of decimal places
- * @return mixed
+ * @param string $point1 A particular marked point
+ * @param string $point2 A particular marked point
+ * @param int $decimals Number of decimal places
+ *
+ * @return string Calculated elapsed time on success,
+ * an '{elapsed_string}' if $point1 is empty
+ * or an empty string if $point1 is not found.
*/
public function elapsed_time($point1 = '', $point2 = '', $decimals = 4)
{
@@ -102,12 +105,13 @@ class CI_Benchmark {
/**
* Memory Usage
*
- * This function returns the {memory_usage} pseudo-variable.
+ * Simply returns the {memory_usage} marker.
+ *
* This permits it to be put it anywhere in a template
* without the memory being calculated until the end.
* The output class will swap the real value for this variable.
*
- * @return string
+ * @return string '{memory_usage}'
*/
public function memory_usage()
{