@php $s = $report['summary']; // 1234 => "1.23 s", 234 => "234 ms" $ms = function ($value) { if ($value === null) { return '-'; } return $value >= 1000 ? number_format($value / 1000, 2) . ' s' : number_format($value) . ' ms'; }; // Change vs previous value, red when it got worse $delta = function ($current, $previous, $higherIsWorse = true, $suffix = '%') { if ($previous === null || $previous == 0) { return ''; } $change = round((($current - $previous) / $previous) * 100, 1); if ($change == 0) { return "(0{$suffix})"; } $worse = $higherIsWorse ? $change > 0 : $change < 0; $color = $worse ? '#c0392b' : '#27ae60'; $sign = $change > 0 ? '+' : ''; return "({$sign}{$change}{$suffix})"; }; $statusColors = ['Critical' => '#c0392b', 'Warning' => '#e67e22', 'Good' => '#27ae60', 'Low volume' => '#888888']; $hourLabel = function ($hour) { return str_pad($hour, 2, '0', STR_PAD_LEFT) . ':00'; }; $prev = $s['previous']; @endphp
|
{{ number_format($s['calls']) }}
Requests {!! $prev ? $delta($s['calls'], $prev['calls'], false) : '' !!}
|
{{ number_format($s['unique_users']) }}
Unique users {!! $prev ? $delta($s['unique_users'], $prev['unique_users'], false) : '' !!}
|
{{ $ms($s['p95']) }}
p95 latency {!! $prev ? $delta($s['p95'], $prev['p95']) : '' !!}
|
{{ $s['rate_5xx'] }}%
5xx rate{{ $prev ? " (prev {$prev['rate_5xx']}%)" : '' }}
|
{{ $s['rate_4xx'] }}%
4xx rate{{ $prev ? " (prev {$prev['rate_4xx']}%)" : '' }}
|
{{ $s['critical'] }} /
{{ $s['warning'] }}
Critical / Warning of {{ $s['endpoints'] }} endpoints
|
| Endpoint | Status | Reason | Calls | p50 | p95 | p99 | Max | p95 vs 7d | 5xx % | Worst hour |
|---|---|---|---|---|---|---|---|---|---|---|
| {{ $row['method'] }} {{ $row['url'] }} | {{ $row['status'] }} | {{ implode('; ', $row['reasons']) }} | {{ number_format($row['calls']) }} | {{ $ms($row['p50']) }} | {{ $ms($row['p95']) }} | {{ $ms($row['p99']) }} | {{ $ms($row['max']) }} | {!! $row['baseline_p95'] !== null ? $ms($row['baseline_p95']) . ' ' . $delta($row['p95'], $row['baseline_p95']) : '-' !!} | {{ $row['rate_5xx'] }}% | {{ $row['worst_hour'] ? $hourLabel($row['worst_hour']['hour']) . ' · p95 ' . $ms($row['worst_hour']['p95']) : '-' }} |
All endpoints within targets.
@endif {{-- Where server time goes --}}| Endpoint | Calls | Avg | p95 | Total time | Share |
|---|---|---|---|---|---|
| {{ $row['method'] }} {{ $row['url'] }} | {{ number_format($row['calls']) }} | {{ $ms($row['avg']) }} | {{ $ms($row['p95']) }} | {{ number_format($row['total_ms'] / 60000, 1) }} min | {{ $row['time_share'] }}% |
| Endpoint | Calls | 5xx | 5xx % | 401/403 | 422 | 429 | Other 4xx |
|---|---|---|---|---|---|---|---|
| {{ $row['method'] }} {{ $row['url'] }} | {{ number_format($row['calls']) }} | {{ number_format($row['count_5xx']) }} | {{ $row['rate_5xx'] }}% | {{ number_format($row['count_auth']) }} | {{ number_format($row['count_422']) }} | {{ number_format($row['count_429']) }} | {{ number_format($row['count_4xx'] - $row['count_auth'] - $row['count_422'] - $row['count_429']) }} |
No 4xx / 5xx responses.
@endif {{-- Hourly --}}| Hour | Requests | Avg | p95 | p99 | 5xx | 5xx % |
|---|---|---|---|---|---|---|
| {{ $hourLabel($hour) }} | {{ number_format($row['calls']) }} | {{ $ms($row['avg']) }} | {{ $ms($row['p95']) }} | {{ $ms($row['p99']) }} | {{ number_format($row['count_5xx']) }} | {{ $row['rate_5xx'] }}% |
| Version | Requests | Share | p95 | 5xx % | 4xx % |
|---|---|---|---|---|---|
| {{ $row['version'] }} | {{ number_format($row['calls']) }} | {{ $s['calls'] ? round(($row['calls'] / $s['calls']) * 100, 1) : 0 }}% | {{ $ms($row['p95']) }} | {{ $row['rate_5xx'] }}% | {{ $row['rate_4xx'] }}% |
| Endpoint | Calls | Users | Avg | p95 | Max | 5xx % | 4xx % | Status |
|---|---|---|---|---|---|---|---|---|
| {{ $row['method'] }} {{ $row['url'] }} | {{ number_format($row['calls']) }} | {{ number_format($row['unique_users']) }} | {{ $ms($row['avg']) }} | {{ $ms($row['p95']) }} | {{ $ms($row['max']) }} | {{ $row['rate_5xx'] }}% | {{ $row['rate_4xx'] }}% | {{ $row['status'] }} |