$profiler = new \Phalcon\Db\Profiler();
// Set the connection profiler
However, the "setProfiler" method does not exist.
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
$connection = new \Phalcon\Db\Adapter\Pdo\Mysql([...]);