diff --git a/js/server_status_monitor.js b/js/server_status_monitor.js
index a25c2b8945..bcdbc8e83d 100644
--- a/js/server_status_monitor.js
+++ b/js/server_status_monitor.js
@@ -2015,15 +2015,31 @@ AJAX.registerOnload('server_status_monitor.js', function() {
var chartData = [];
var numberTable = '
| ' + PMA_messages['strStatus'] + ' | ' + PMA_messages['strTime'] + ' |
';
var duration;
+ var otherTime = 0;
for (var i = 0, l = data.profiling.length; i < l; i++) {
duration = parseFloat(data.profiling[i].duration);
- chartData.push([data.profiling[i].state, duration]);
totalTime += duration;
numberTable += '| ' + data.profiling[i].state + ' | ' + PMA_prettyProfilingNum(duration, 2) + ' |
';
}
+
+ // Only put those values in the pie which are > 2%
+ for (var i = 0, l = data.profiling.length; i < l; i++) {
+ duration = parseFloat(data.profiling[i].duration);
+
+ if (duration / totalTime > 0.02) {
+ chartData.push([PMA_prettyProfilingNum(duration, 2) + ' ' + data.profiling[i].state, duration]);
+ } else {
+ otherTime += duration;
+ }
+ }
+
+ if (otherTime > 0) {
+ chartData.push([PMA_prettyProfilingNum(otherTime, 2) + ' ' + PMA_messages['strOther'], otherTime]);
+ }
+
numberTable += '| ' + PMA_messages['strTotalTime'] + ' | ' + PMA_prettyProfilingNum(totalTime, 2) + ' |
';
numberTable += '
';
@@ -2049,7 +2065,7 @@ AJAX.registerOnload('server_status_monitor.js', function() {
chartData
);
- $('div#queryProfiling').resizable();
+ //$('div#queryProfiling').resizable();
}
});
}
diff --git a/server_status.php b/server_status.php
index 3b0137ae50..b8d00b05fd 100644
--- a/server_status.php
+++ b/server_status.php
@@ -405,7 +405,7 @@ if (isset($_REQUEST['ajax_request']) && $_REQUEST['ajax_request'] == true) {
PMA_DBI_select_db($_REQUEST['database']);
}
- if ($profiling == PMA_Util::profilingSupported()) {
+ if ($profiling = PMA_Util::profilingSupported()) {
PMA_DBI_query('SET PROFILING=1;');
}
diff --git a/themes/pmahomme/css/common.css.php b/themes/pmahomme/css/common.css.php
index 54bfbbfe46..221a37a260 100644
--- a/themes/pmahomme/css/common.css.php
+++ b/themes/pmahomme/css/common.css.php
@@ -1357,7 +1357,7 @@ div#queryAnalyzerDialog div.CodeMirror-scroll {
}
div#queryAnalyzerDialog div#queryProfiling {
- height: 250px;
+ height: 300px;
}
div#queryAnalyzerDialog td.explain {