function dba_mysql_statpack_statement in Database Administration 7
1 call to dba_mysql_statpack_statement()
- dba_mysql_statpack_output in database/
mysql.statpack.inc
File
- database/
mysql.statpack.inc, line 237
Code
function dba_mysql_statpack_statement($title, $first, $last, $statements) {
$delta = dba_statpack_short($last - $first);
if ($delta > 0) {
$col1 = "{$delta} (" . dba_statpack_short(dba_statpack_to_percentage($delta / $statements[2])) . '%)';
}
else {
$col1 = $delta;
}
$col2 = dba_statpack_short($delta / variable_get('dba_statpack_interval', DBA_STATPACK_INTERVAL));
if ($last > 0) {
$col3 = dba_statpack_short($last) . ' (' . dba_statpack_short(dba_statpack_to_percentage($last / $statements[1])) . '%)';
}
else {
$col3 = dba_statpack_short($last);
}
if (variable_get('dba_statpack_hide', TRUE) && !$col3) {
return '';
}
else {
return dba_statpack_columns(array(
$title,
$col1,
$col2,
$col3,
));
}
}