Database profiling

Hi!

Docs say:

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

 // Set the connection profiler
$connection->setProfiler($profiler);

However, the "setProfiler" method does not exist.

Any idea?

Hi Sergey, you can check this other examples in documentation

Model: Profiling SQL Statementst

Database: Profiling SQL Statements

Set profiler is part of Mysql $connection = new \Phalcon\Db\Adapter\Pdo\Mysql([...]); you can get from DI if you have one service for db connection and other for profiling

Good Luck