{{-- NAVBAR --}}
{{-- TARJETAS RESUMEN --}}

Total Requests

{{ $summary['total_requests'] }}

Tiempo Promedio

{{ $summary['weighted_avg_ms'] }}ms

Tasa de Error

{{ $summary['error_rate'] }}%

Errores Totales

{{ $summary['total_errors'] }}

Endpoints Activos

{{ $summary['unique_endpoints'] }}

{{-- GRÁFICOS DE TRÁFICO Y TIEMPO --}}

Requests por hora

Tiempo de respuesta promedio (ms)

{{-- CRITICALITY TABLE --}}

Criticality Score — Endpoints que más impacto tienen

Score = requests totales × tiempo promedio (ms) / 1000 → segundos totales de espera de usuarios

@forelse($criticalEndpoints as $i => $ep) @php $score = (float) $ep->criticality_score; if ($score >= 100000) $scoreClass = 'score-critical'; elseif ($score >= 30000) $scoreClass = 'score-high'; elseif ($score >= 5000) $scoreClass = 'score-medium'; else $scoreClass = 'score-low'; $method = strtolower($ep->method); $badgeClass = 'badge-' . $method; @endphp @empty @endforelse
# Endpoint Método Requests Avg P95 Pico Err% Score
{{ $i + 1 }} {{ $ep->route_uri }} {{ $ep->method }} {{ number_format($ep->total_requests) }} {{ number_format($ep->avg_ms) }}ms {{ number_format($ep->p95_ms) }}ms {{ number_format($ep->peak_ms) }}ms {{ $ep->error_rate_pct }}% {{ number_format($score) }}
Sin datos para el período seleccionado.
Ejecutá php artisan metrics:aggregate para procesar los datos.
{{-- TOP LENTOS + TOP LLAMADOS --}}

Top 10 más lentos (avg ms)

@forelse($slowestEndpoints as $ep) @php $pct = $slowestEndpoints->first()->avg_ms > 0 ? round($ep->avg_ms / $slowestEndpoints->first()->avg_ms * 100) : 0; @endphp
{{ $ep->method }} {{ $ep->route_uri }} {{ number_format($ep->avg_ms) }}ms
@empty

Sin datos

@endforelse

Top 10 más llamados

@forelse($busiestEndpoints as $ep) @php $pct = $busiestEndpoints->first()->total_requests > 0 ? round($ep->total_requests / $busiestEndpoints->first()->total_requests * 100) : 0; @endphp
{{ $ep->method }} {{ $ep->route_uri }} {{ number_format($ep->total_requests) }}
@empty

Sin datos

@endforelse
{{-- HEATMAP TRÁFICO POR HORA DEL DÍA (últimos 30 días) --}}

Picos de tráfico por hora del día (promedio últimos 30 días)

Muestra en qué horarios el sistema recibe más carga. Útil para programar mantenimientos y escalar recursos.

@for($h = 0; $h < 24; $h++) @php $val = isset($trafficByHour[$h]) ? (int) $trafficByHour[$h]->avg_requests : 0; $maxVal = $trafficByHour->max('avg_requests') ?: 1; $intensity = $maxVal > 0 ? $val / $maxVal : 0; if ($intensity >= 0.8) $bg = 'bg-emerald-600 text-white'; elseif ($intensity >= 0.6) $bg = 'bg-emerald-500 text-white'; elseif ($intensity >= 0.4) $bg = 'bg-emerald-400 text-white'; elseif ($intensity >= 0.2) $bg = 'bg-emerald-200 text-emerald-800'; elseif ($intensity > 0) $bg = 'bg-emerald-100 text-emerald-600'; else $bg = 'bg-gray-100 text-gray-400'; @endphp
{{ str_pad($h, 2, '0', STR_PAD_LEFT) }}h
{{ $val }}
@endfor
Menor
Mayor
{{-- Scripts de gráficos --}}