CI_Benchmark

class CI_Benchmark

mark($name)
Parameters:
  • $name (string) – the name you wish to assign to your marker
Return type:

void

Sets a benchmark marker.

elapsed_time([$point1 = ''[, $point2 = ''[, $decimals = 4]]])
Parameters:
  • $point1 (string) – a particular marked point
  • $point2 (string) – a particular marked point
  • $decimals (int) – number of decimal places for precision
Returns:

Elapsed time

Return type:

string

Calculates and returns 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.

memory_usage()
Returns: Memory usage info
Return type: string

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.

doc_CodeIgniter
2016-10-15 16:30:54
Comments
Leave a Comment

Please login to continue.