Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Get response time?

Hi,

I would like to get the full response time of the micro serving a request.

Is there any other easier, cleanier way rather than using the following pseudo code?

Thanks.

$app->before(function() use ($app) { var start = mictorime() });

$app->finish(function() use ($app) { log(microtime() - start) });
<?php

$app->finish(function () {
    printf('%.2f ms', (microtime(TRUE) - $_SERVER['REQUEST_TIME_FLOAT']) * 1000);
});

Thanks Oscar,

I was hoping to have something like

$profiler = new Phalcon\Db\Profiler();

Maybe we need something for http?



6.3k
Accepted
answer
edited Apr '15

Thanks Oscar,

I was hoping to have something like

$profiler = new Phalcon\Db\Profiler();

Maybe we need something for http?

There is http://prophiler.fabfuel.de/demo.php

Awesome, that is what I was looking for!