Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

How Can I Debug The Loading Time Of Each Block In A Page? Rate Topic   - - - - -

 
  • Jamalla
  • Senior Member
  • Members
  • Join Date: 23-Sep 17
  • 231 posts

Posted 03 February 2019 - 02:45 PM #1

Hi,

 

I think there is a way to check the the loading time and number of requests for each block in a page?

 

Can any one advise please ..



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11174 posts

Posted 03 February 2019 - 07:53 PM #2

You can either enable debug which will give you a gross look at DB versus PHP performance and combine that withe using your browser inspector to review each request.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • Jamalla
  • Senior Member
  • Members
  • Join Date: 23-Sep 17
  • 231 posts

Posted 04 February 2019 - 02:43 AM #3

Thanks Tony for the reply..

 

I did the following in the config.php file:

//Uncomment to enable the developer tools: debugger, PHP and SQL loggers, etc.
define('DEBUG_MODE', true);

//Uncomment to enable error reporting.
define('DEVELOPMENT', true);
 

Also I cleared the cashe .. but still can not see the bug icon ..



 
  • Hungryweb
  • Senior Member
  • Authorized Reseller
  • Join Date: 10-Feb 12
  • 1238 posts

Posted 04 February 2019 - 04:35 AM #4

Please check the website header or others blocks, maybe something is over debug icon and have a higher z-index :D



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 18798 posts

Posted 04 February 2019 - 06:05 AM #5

Thanks Tony for the reply..

 

I did the following in the config.php file:

//Uncomment to enable the developer tools: debugger, PHP and SQL loggers, etc.
define('DEBUG_MODE', true);

//Uncomment to enable error reporting.
define('DEVELOPMENT', true);
 

Also I cleared the cashe .. but still can not see the bug icon ..

 

Please check the following article

 

https://docs.cs-cart...s/debugger.html


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • Jamalla
  • Senior Member
  • Members
  • Join Date: 23-Sep 17
  • 231 posts

Posted 04 February 2019 - 07:30 AM #6

Okay thanks ... I will use all what you suggested .. thanks



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11174 posts

Posted 04 February 2019 - 06:23 PM #7

It is best to have DEBUG and DEVELOPMENT be defined for you (or some set of users) only.

Here's what I use at many of my clients for a 'local_conf.php' file which is included from config.local.php.

 

Just change the $debug_ip's array to use your IP (or an array of different IP's) and it should work fine.  You shouldn't have to clear the cache.

 

/*
 * Copyright 2011, 1st Source IT, LLC, EZ Merchant Solutions
 */
use Tygh\Registry;
 
if( !defined('BOOTSTRAP') ) die('Access denied');
define('my_debug_enabled', true);  // change to false to disable
function my_debug_ip() {
    $debug_ips = array('xx.yy.117.55');
    return in_array($_SERVER['REMOTE_ADDR'], $debug_ips);
}
 
if( defined('my_debug_enabled') && my_debug_enabled && my_debug_ip() ) {
    if(!defined('DEVELOPMENT')) define('DEVELOPMENT', true);
define('DEBUG_MODE', true);
    error_reporting(E_ALL);
    ini_set('display_errors', true);
}

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • Jamalla
  • Senior Member
  • Members
  • Join Date: 23-Sep 17
  • 231 posts

Posted 06 February 2019 - 04:49 AM #8

 

It is best to have DEBUG and DEVELOPMENT be defined for you (or some set of users) only.

Here's what I use at many of my clients for a 'local_conf.php' file which is included from config.local.php.

 

Just change the $debug_ip's array to use your IP (or an array of different IP's) and it should work fine.  You shouldn't have to clear the cache.

/*
 * Copyright 2011, 1st Source IT, LLC, EZ Merchant Solutions
 */
use Tygh\Registry;
 
if( !defined('BOOTSTRAP') ) die('Access denied');
define('my_debug_enabled', true);  // change to false to disable
function my_debug_ip() {
    $debug_ips = array('xx.yy.117.55');
    return in_array($_SERVER['REMOTE_ADDR'], $debug_ips);
}
 
if( defined('my_debug_enabled') && my_debug_enabled && my_debug_ip() ) {
    if(!defined('DEVELOPMENT')) define('DEVELOPMENT', true);
define('DEBUG_MODE', true);
    error_reporting(E_ALL);
    ini_set('display_errors', true);
}

 

Awesome! good to know that ,, thanks alot Tony :)