Well, lowercase m is the standard ISO for milli. This patch would produce more decimals, but for an average per hour I think it's overkill to display so many decimals.
Without the patch, in my server status, I see in the average for SELECT: 21.27 k so I wonder why you are asking to see 1.69 k. Are you talking about the hourly average?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, according to libraries/common.lib.php in PMA_formatNumber(), this "m" is for milli.
That's too confusing...
Is there a need for milli anywhere?
Which value do you want to see there, instead of 8.82m ?
0.0082 or 0.00
Maybe even 8.82 milli
Well, lowercase m is the standard ISO for milli. This patch would produce more decimals, but for an average per hour I think it's overkill to display so many decimals.
Index: server_status.php
--- server_status.php (revision 13258)
+++ server_status.php (copie de travail)
@@ -570,7 +570,7 @@
<th class="name"><?php echo htmlspecialchars($name); ?></th>
<td class="value"><?php echo PMA_formatNumber($value, 4, 0); ?></td>
<td class="value"><?php echo
- PMA_formatNumber($value * $hour_factor, 4, 2); ?></td>
+ PMA_formatNumber($value * $hour_factor, 4, 4); ?></td>
<td class="value"><?php echo
PMA_formatNumber($value * $perc_factor, 0, 2); ?>%</td>
</tr>
Yes, but this is an app, not science...
So m is just too confusing.
3 significant digits is good, 4 digits after the dot should not be done.
It'd be nice to show 1,692.83 as 1.69 k actually.
See also https://sourceforge.net/tracker/?func=detail&aid=1954161&group_id=23067&atid=377411
Without the patch, in my server status, I see in the average for SELECT: 21.27 k so I wonder why you are asking to see 1.69 k. Are you talking about the hourly average?
Yes. The request is to have 3 (and only 3) significant digits. A function I've written:
function xbt_b2a($v)
{
for ($l = 0; $v < -999 || $v > 999; $l++)
$v /= 1024;
$a = array('b', 'kb', 'mb', 'gb', 'tb', 'pb', 'eb', 'zb', 'eb');
return sprintf('%.2f %s', $v, $a[$l]);
}
This patch should do the job, please confirm:
Index: server_status.php
===================================================================
--- server_status.php (revision 13258)
+++ server_status.php (copie de travail)
@@ -570,7 +570,7 @@
<th class="name"><?php echo htmlspecialchars($name); ?></th>
<td class="value"><?php echo PMA_formatNumber($value, 4, 0); ?></td>
<td class="value"><?php echo
- PMA_formatNumber($value * $hour_factor, 4, 2); ?></td>
+ PMA_formatNumber($value * $hour_factor, 3, 3); ?></td>
<td class="value"><?php echo
PMA_formatNumber($value * $perc_factor, 0, 2); ?>%</td>
</tr>
Isn't that 3 digits before and 3 after the dot?
That's not what 3 significant digits means. 3 digits would be:
#.##
##.#
###
#.## k
##.# k
### k
etc
Please try it.
It does fix the issue with milli, but the other issues are still present.
I was not aware that there were other issues mentioned in this tracker item. Are you talking about the feature request you cited?
Oops. Yes. ;)
Fixed in subversion, thanks for reporting.