优化界面布局
This commit is contained in:
@@ -28,6 +28,15 @@ function formatBandwidth(bytesPerSec, decimals = 2) {
|
||||
return value.toFixed(decimals) + ' ' + sizes[i];
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert bytes per second to MB/s (numeric string)
|
||||
*/
|
||||
function toMBps(bytesPerSec, decimals = 2) {
|
||||
if (!bytesPerSec || bytesPerSec === 0) return '0.00';
|
||||
const mbps = bytesPerSec / (1024 * 1024);
|
||||
return mbps.toFixed(decimals);
|
||||
}
|
||||
|
||||
/**
|
||||
* Format percentage
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user