Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Yii profiler adjusted to deal with MySQL performance optimizations

branch: master

Merge pull request #2 from herroffizier/master

Added check for collapsedInFireBug in firebug view
latest commit 35ffbc3608
Alexander Makarov authored February 14, 2014
Octocat-spinner-32 views
Octocat-spinner-32 DbProfileLogRoute.php
Octocat-spinner-32 changelog.md
Octocat-spinner-32 readme.md
readme.md

DB profiler

Instead of regular CProfileLogRoute DB profiler displays database queries and query-related info only. Also it have an ability to highligt possibly slow queries and queries repeated many times.

Installation

Unpack to protected/extensions/. Add the following to your protected/config/main.php:

<?php
return array(
    // …
    'components' => array(
        // …
        'db' => array(
            // …
            'enableProfiling'=>true,
            'enableParamLogging' => true,
        ),
        'log'=>array(
            'class'=>'CLogRouter',
            'routes'=>array(
                    // …
                    array(
                        'class'=>'ext.db_profiler.DbProfileLogRoute',
                        'countLimit' => 1, // How many times the same query should be executed to be considered inefficient
                        'slowQueryMin' => 0.01, // Minimum time for the query to be slow
                    ),
            ),
        ),
    ),
);
Something went wrong with that request. Please try again.