From 59c1a2940067047b535059773703d45d78558628 Mon Sep 17 00:00:00 2001 From: Cloud User Date: Tue, 17 Mar 2026 13:56:50 +0900 Subject: [PATCH] fix: adjust z-score threshold to 5, memory warning 80%/critical 90% Co-Authored-By: Claude Opus 4.6 --- src/components/report/AlertPanel.tsx | 4 ++-- src/lib/analytics.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/report/AlertPanel.tsx b/src/components/report/AlertPanel.tsx index 5c3339c..5867319 100644 --- a/src/components/report/AlertPanel.tsx +++ b/src/components/report/AlertPanel.tsx @@ -35,9 +35,9 @@ function generateAlerts(instances: MetricInstance[], type: string): Alert[] { }); }); } else if (type === 'memory') { - if (inst.stats.max > 85) { + if (inst.stats.max > 80) { alerts.push({ - level: inst.stats.max > 95 ? 'critical' : 'warning', + level: inst.stats.max > 90 ? 'critical' : 'warning', instance: inst.instance, message: `최대 ${formatPercent(inst.stats.max)} 도달`, }); diff --git a/src/lib/analytics.ts b/src/lib/analytics.ts index 6ed6054..35cde3c 100644 --- a/src/lib/analytics.ts +++ b/src/lib/analytics.ts @@ -33,7 +33,7 @@ export function calculateStats(dataPoints: DataPoint[]): Stats { export function detectPeaks( dataPoints: DataPoint[], - threshold: number = 2 + threshold: number = 5 ): { points: (DataPoint & { zScore: number; isPeak: boolean })[]; peaks: PeakInfo[] } { const values = dataPoints.map((d) => d.value); const mean = values.reduce((a, b) => a + b, 0) / values.length;