Problem/Motivation

devel_query_table() does a beautiful job of formatting the query log, and offering "placeholder / argument / EXPLAIN" links. Unfortunately it cannot be called more than once per page, because the request ID is stored in the global Drupal.settings variable.

Being able to reuse this function would be super useful for fine-grained performance metrics, especially in light of DBTNG's Database::getLog function (which can capture more than one log simultaneously). An example would be logging the queries run inside a particular panel pane.

Proposed resolution

Only a very small change is needed - the request ID is stored as a DOM attribute, instead of a global variable.

Remaining tasks

Patch needs review.

User interface changes

N/A

API changes

N/A

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

grendzy’s picture

Here's an example screenshot of using devel_query_table to measure a view (testing while working on #2191287: checkbox for "Show other queries run during render" does nothing ).

pcambra’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev
Status: Needs review » Needs work

Looks good, could we have this D8 first please?

willzyx’s picture

Version: 8.x-1.x-dev » 7.x-1.x-dev

devel_query_table() no longer exists in the 8.x branch. Moved to 7.x queque

willzyx’s picture

Status: Needs work » Closed (outdated)

Closing for lack of activity. Feel free to reopen if the issue still exists