public function __destruct()
{
try {
if (class_exists('Piwik\\Profiler') && !SettingsServer::isTrackerApiRequest()) {
// in tracker mode Piwik\Tracker\Db\Pdo\Mysql does currently not implement profiling
Profiler::displayDbProfileReport();
Profiler::printQueryCount();
}
} catch (Exception $e) {
Log::debug($e);
}
}