.sql .nu0 {color: #cc66cc;}
.sql span.xtra { display:block; }
-#queriespersecond_graph, #connectionspersecond_graph, #queriesduration_graph, #checkpointwritebuffers_graph, #checkpointfiles_graph, #restartpointwritebuffers_graph, #temporaryfile_graph, #autovacuum_graph, #selectqueries_graph, #writequeries_graph {
+#queriespersecond_graph, #connectionspersecond_graph, #queriesduration_graph, #checkpointwritebuffers_graph, #checkpointfiles_graph, #restartpointwritebuffers_graph, #temporarydata_graph, #temporaryfile_graph, #autovacuum_graph, #selectqueries_graph, #writequeries_graph {
width : 1025px;
height: 400px;
background:#F3F2ED;
}
# Temporary file size
- if ($tempfile_info{count} && exists $graph_data{size}) {
+ if (exists $graph_data{size}) {
&flotr2_graph(
- $graphid++, 'temporaryfile_graph', $graph_data{size}, '', '', 'Temporary files (' . $avg_minutes . ' minutes period)',
- 'Size of files', 'Size of files', '', '', 'Number of files', $graph_data{count}, 'Number of files'
+ $graphid++, 'temporarydata_graph', $graph_data{size}, '', '', 'Size of temporary files (' . $avg_minutes . ' minutes period)',
+ 'Size of files', 'Size of files'
);
}
+ # Temporary file number
+ if ($tempfile_info{count}) {
+ &flotr2_graph(
+ $graphid++, 'temporaryfile_graph', $graph_data{count}, '', '', 'Number of temporary files (' . $avg_minutes . ' minutes period)',
+ 'Number of files', 'Number of files'
+ );
+ }
+
+
# VACUUMs and ANALYZEs
if ($autovacuum_info{count} || $autoanalyze_info{count}) {
if (exists $graph_data{vcount} || exists $graph_data{acount}) {
},
mouse: {
track: true,
- trackFormatter: function(obj){ return dateTracker(obj) },
+ trackFormatter: function(obj){ return dateTracker(obj,'$type') },
relative: true,
sensibility: 5,
trackDecimals: 2,
lineColor: 'purple',
},
- crosshair:{
- mode: 'xy'
- },
HtmlText: false,
};
}
}
-function dateTracker(obj)
+function dateTracker(obj, gtype)
{
var dateToDisplay = new Date(parseInt(obj.x));
- return dateToDisplay.toGMTString()+', '+obj.series.label+': '+obj.y;
+ return dateToDisplay.toGMTString()+', '+obj.series.label+': '+pretty_print_number(obj.y, gtype);
}
function pretty_print_number(val, type)