分开上下行统计
This commit is contained in:
@@ -49,9 +49,8 @@ class AreaChart {
|
||||
}
|
||||
|
||||
// Calculate P95 (95th percentile)
|
||||
// Common standard: 95th percentile of the peak (max of rx/tx or sum)
|
||||
// We'll use max(rx, tx) at each point which is common for billing
|
||||
const combined = data.rx.map((r, i) => Math.max(r || 0, data.tx[i] || 0));
|
||||
// Updated: Only count Upstream (TX) as requested
|
||||
const combined = data.tx.map(t => t || 0);
|
||||
if (combined.length > 0) {
|
||||
const sorted = [...combined].sort((a, b) => a - b);
|
||||
const p95Idx = Math.floor(sorted.length * 0.95);
|
||||
|
||||
Reference in New Issue
Block a user