SystemStats / network: dont show bytes
This commit is contained in:
parent
ad73f11b69
commit
0e4b79fd16
1 changed files with 2 additions and 4 deletions
|
|
@ -321,10 +321,8 @@ Singleton {
|
||||||
// -------------------------------------------------------
|
// -------------------------------------------------------
|
||||||
// Helper function to format network speeds
|
// Helper function to format network speeds
|
||||||
function formatSpeed(bytesPerSecond) {
|
function formatSpeed(bytesPerSecond) {
|
||||||
if (bytesPerSecond < 1024) {
|
if (bytesPerSecond < 1024 * 1024) {
|
||||||
return bytesPerSecond.toFixed(0) + "B/s"
|
return (bytesPerSecond / 1024).toFixed(1) + "KB/s"
|
||||||
} else if (bytesPerSecond < 1024 * 1024) {
|
|
||||||
return (bytesPerSecond / 1024).toFixed(0) + "KB/s"
|
|
||||||
} else if (bytesPerSecond < 1024 * 1024 * 1024) {
|
} else if (bytesPerSecond < 1024 * 1024 * 1024) {
|
||||||
return (bytesPerSecond / (1024 * 1024)).toFixed(1) + "MB/s"
|
return (bytesPerSecond / (1024 * 1024)).toFixed(1) + "MB/s"
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue