Profiling

Kohana provides a very simple way to display statistics about your application:

  1. Common Kohana method calls
  2. Requests
  3. Database queries
  4. Average execution times for your application

Example

You can display or collect the current profiler statistics at any time:

<div id="kohana-profiler">
<?php echo View::factory('profiler/stats') ?>
</div>

Preview

Kohana 0.030560 s
413.7031 kB
Benchmark Min Max Average Total
init (1)
0.002837 s
0.002837 s
0.002837 s
0.002837 s
225.0000 kB
225.0000 kB
225.0000 kB
225.0000 kB
modules (1)
0.010277 s
0.010277 s
0.010277 s
0.010277 s
185.1328 kB
185.1328 kB
185.1328 kB
185.1328 kB
find_file (4)
0.003742 s
0.004618 s
0.004362 s
0.017446 s
0.7969 kB
0.9609 kB
0.8926 kB
3.5703 kB
Requests 0.038144 s
1,311.3750 kB
Benchmark Min Max Average Total
"guide/debugging.profiling" (1)
0.038498 s
0.038498 s
0.038498 s
0.038498 s
1,320.3594 kB
1,320.3594 kB
1,320.3594 kB
1,320.3594 kB
Application Execution (967) 0.040662 s 1.777496 s 0.149532 s 0.063682 s
2,414.0078 kB 2,536.4063 kB 2,492.9855 kB 2,513.2891 kB

Documentation comments powered by Disqus