From ce55e4acd1595b025daeccbc605dae781eafe703 Mon Sep 17 00:00:00 2001 From: Nisarg Jhaveri Date: Fri, 19 Jun 2015 12:07:09 +0530 Subject: [PATCH] Show percentage of time taken in console SQL debug Signed-off-by: Nisarg Jhaveri --- js/console.js | 19 ++++++++++--------- libraries/Console.class.php | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/js/console.js b/js/console.js index d32e7c1039..ec32f252df 100644 --- a/js/console.js +++ b/js/console.js @@ -1260,23 +1260,23 @@ var PMA_consoleDebug = { } return $traceElem; }, - _formatQueryOrGroup: function(queryInfo) { - var grouped, queryText, totalTime, count, i; + _formatQueryOrGroup: function(queryInfo, totalTime) { + var grouped, queryText, queryTime, count, i; if (Array.isArray(queryInfo)) { // It is grouped grouped = true; queryText = queryInfo[0].query; - totalTime = 0; + queryTime = 0; for (i in queryInfo) { - totalTime += queryInfo[i].time; + queryTime += queryInfo[i].time; } count = queryInfo.length; } else { queryText = queryInfo.query; - totalTime = queryInfo.time; + queryTime = queryInfo.time; } var $query = $('' . ''; // Template $output .= ''; // Debug SQL card