DbRequestProfiler
in package
Profiles MySQL query count and execution time for a single request.
Only active when $mode is 'test' — safe to instantiate in all environments. Results are written to the PHP error log via error_log().
Usage: (new DbRequestProfiler($dbc, 'PDF export | art_kt=1', $cfg->mode))->start();
Output example: [PROFILE] PDF export | art_kt=1 | queries: 847 | time: 4231.50 ms
Table of Contents
Methods
- __construct() : mixed
- start() : void
Methods
__construct()
public
__construct(mysqli $dbc, string $label, string $mode) : mixed
Parameters
- $dbc : mysqli
- $label : string
- $mode : string
start()
public
start() : void