blob: fa66f1ba3fd24377fe74a47844e2e633fa1add10 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<?php
class ControllerEventDebug extends Controller {
public function before(&$route, &$args) {
if ($route == 'common/home') { // add the route you want to test
$this->session->data['debug'][$route] = microtime();
}
}
public function after($route, &$args, &$output) {
if ($route == 'common/home') { // add the route you want to test
if (isset($this->session->data['debug'][$route])) {
$log_data = array(
'route' => $route,
'time' => microtime() - $this->session->data['debug'][$route]
);
$this->log->write($log_data);
}
}
}
}
|