-
Notifications
You must be signed in to change notification settings - Fork 0
CI_Benchmark
Benchmark Class
This class enables you to mark points and calculate the time difference between them. Memory consumption can also be displayed.
- Class name: CI_Benchmark
- Namespace:
public array $marker = array()
List of all benchmark markers
- Visibility: public
void CI_Benchmark::mark(string $name)
Set a benchmark marker
Multiple calls to this function can be made so that several execution points can be timed.
- Visibility: public
- $name string - <p>Marker name</p>
string CI_Benchmark::elapsed_time(string $point1, string $point2, integer $decimals)
Elapsed time
Calculates the time difference between two marked points.
If the first parameter is empty this function instead returns the {elapsed_time} pseudo-variable. This permits the full system execution time to be shown in a template. The output class will swap the real value for this variable.
- Visibility: public
- $point1 string - <p>A particular marked point</p>
- $point2 string - <p>A particular marked point</p>
- $decimals integer - <p>Number of decimal places</p>
string CI_Benchmark::memory_usage()
Memory Usage
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.
- Visibility: public