2017 © Pedro Peláez
 

library dbmole-panel

A panel for Tracy Debugger with DbMole statistics

image

atk14/dbmole-panel

A panel for Tracy Debugger with DbMole statistics

  • Thursday, June 28, 2018
  • by yarri
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3,871 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 18 % Grown

The README.md

DbMolePanel

A panel for Tracy Debugger with DbMole statistics. This is highly recommended tool for profiling an ATK14 application., (*1)

Basic usage

$bar = Tracy\Debugger::getBar();
$bar->addPanel(new DbMolePanel($dbmole));

Usage in an ATK14 application (built upon Atk14Skelet)

Use the Composer to install the panel., (*2)

cd path/to/your/atk14/project/
composer require atk14/dbmole-panel

Load autoloader from the Composer and enable the Tracy Debugger., (*3)

// file: lib/load.php
require(__DIR__."/../vendor/autoload.php");

if(
  !TEST &&
  !$HTTP_REQUEST->xhr() &&
  php_sapi_name()!="cli" // we do not want Tracy in cli
){
  Tracy\Debugger::enable(PRODUCTION, __DIR__ . '/../log/');
}

Enable collecting of the DbMole statistics in DEVELOPMENT., (*4)

// file: config/settings.php
define("DBMOLE_COLLECT_STATICTICS",DEVELOPMENT);

Add the DbMole panel to the Tracy in _application_after_filter()., (*5)

// file: app/controllers/application_base.php
function _application_after_filter(){
  if(DBMOLE_COLLECT_STATICTICS){
    $bar = Tracy\Debugger::getBar();
    $bar->addPanel(new DbMolePanel($this->dbmole));
  }
}

Licence

DbMolePanel is free software distributed under the terms of the MIT license, (*6)

The Versions

28/06 2018

dev-master

9999999-dev https://github.com/atk14/DbMolePanel

A panel for Tracy Debugger with DbMole statistics

  Sources   Download

MIT

The Requires

 

tracy atk14 dbmole

13/04 2018

v1.0

1.0.0.0 https://github.com/atk14/DbMolePanel

A panel for Tracy Debugger with DbMole statistics

  Sources   Download

MIT

The Requires

 

tracy atk14 dbmole