Hello - Kieran from CSL and I are wondering how we might get devel.module to record and report on SQL queries issued by the CiviCRM application/module (http://drupal.org/project/CiviCRM). I am not a very skilled PHP programmer - so far my investigation has stalled at the global $queries variable. Does devel.module create that variable, or is that created somewhere else in Drupal?

CIviCRM uses the PEAR DB/ DB_DataObject (?) method of assembling queries. I'm hoping there is a relatively easy to modify the construction of the $queries variable to include those queries as well, or perhaps more painfully to change CiviCRM's query method to call whatever hook invokes the part of Drupal that records queries.

Any thoughts? Much thanks. CiviCRM is performance intensive compared to other individual parts of Drupal/modules, I believe there probably will be some need for folks to measure it.

Comments

moshe weitzman’s picture

see _db_query() in includes/database..inc

you can just add to the $GLOBALS['queries'] array from wherever is convenient in your app. You will have to input timing dtaa manually if possble.

moshe weitzman’s picture

Category: feature » support
Status: Active » Fixed

support query has been answered.

Anonymous’s picture

Status: Fixed » Closed (fixed)