Fix missing avg duration comparison on route Performance tab
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -45,6 +45,7 @@ export function PerformanceTab({ group, routeId }: PerformanceTabProps) {
|
||||
const prevFailureRate = stats && stats.prevTotalCount > 0
|
||||
? (stats.prevFailedCount / stats.prevTotalCount) * 100 : 0;
|
||||
|
||||
const avgChange = stats ? pctChange(stats.avgDurationMs, stats.prevAvgDurationMs) : null;
|
||||
const p99Change = stats ? pctChange(stats.p99LatencyMs, stats.prevP99LatencyMs) : null;
|
||||
const failChange = stats ? pctChange(failureRate, prevFailureRate) : null;
|
||||
|
||||
@@ -63,6 +64,8 @@ export function PerformanceTab({ group, routeId }: PerformanceTabProps) {
|
||||
label="Avg Duration"
|
||||
value={stats ? `${stats.avgDurationMs}ms` : '--'}
|
||||
accent="cyan"
|
||||
change={avgChange?.text}
|
||||
changeDirection={avgChange?.direction}
|
||||
sparkData={sparkAvg}
|
||||
/>
|
||||
<StatCard
|
||||
|
||||
Reference in New Issue
Block a user