Benchmarks - mithra62/ee_debug_toolbar GitHub Wiki

The ExpressionEngine Benchmark library is only a timer so the benchmarks are useful for determining bottlenecks in your code.

Example

Within your PHP scripts you'll essentially want to have 2 calls (a start and a stop) to the below methods: ee()->benchmark->mark('your_benchmark_name_start');

then later...

ee()->benchmark->mark('your_benchmark_name_stop');

Key Naming Convention

To have your benchmark names readable within the Toolbar you have to follow a couple conventions.

  1. Your benchmark names should end in either the string "_start" or "_end".

  2. Ensure the names are logical enoughe to be parsed using the below PHP:

    ucwords(str_replace(array('_', '-'), ' ', $key))

Examples 'debug_toolbar_start' and 'debug_toolbar_end'