We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

Database profiling


Docs say:

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

 // Set the connection 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