@extends('layout.app') @section('title') System Analysis @endsection @section('pagetitle') System Analysis @endsection @section('content')

System Performance & Memory Analysis

{{-- SUMMARY CARDS --}}
{{ $summary['total_entries'] }}
Total Samples (memprof.log)
{{ $summary['total_routes'] }}
Unique Endpoints
@if($summary['most_called'])
Most Called Route
{{ $summary['most_called']['route'] }}
{{ $summary['most_called']['count'] }} calls ({{ number_format($summary['most_called']['percentage'], 1) }}%)
@else
No Data
@endif
@if($summary['slowest_route'])
Slowest (Avg)
{{ $summary['slowest_route']['route'] }}
{{ number_format($summary['slowest_route']['avg_duration'], 1) }} ms avg
@else
No Data
@endif
@if ($summary['total_entries'] == 0)

No data found in storage/logs/memprof.log. Make sure your profiler is writing JSON lines into this file.

@else
{{-- MOST CALLED ROUTES --}}

Most Called Routes

@forelse ($byCount as $index => $row) @empty @endforelse
# Route Calls % of Total Avg Time (ms) Avg Mem
{{ $byCount->firstItem() + $index }} @if (!empty($row['is_api']) && $row['is_api']) API @endif {{ $row['route'] }} {{ $row['count'] }} {{ number_format($row['percentage'], 1) }}% {{ number_format($row['avg_duration'], 1) }} {{ number_format($row['avg_memory'], 2) }}
No route data available.
{{-- PAGINATION FOR MOST CALLED --}}
{{ $byCount->links() }}
{{-- SLOWEST ROUTES --}}

Slowest Routes (Avg Duration)

@forelse ($byAvgDuration as $index => $row) @empty @endforelse
# Route Calls Avg Time (ms) Max Time (ms) Max Mem
{{ $byAvgDuration->firstItem() + $index }} @if (!empty($row['is_api']) && $row['is_api']) API @endif {{ $row['route'] }} {{ $row['count'] }} {{ number_format($row['avg_duration'], 1) }} {{ number_format($row['max_duration'], 1) }} {{ number_format($row['max_memory'], 2) }}
No route data available.
{{-- PAGINATION FOR SLOWEST --}}
{{ $byAvgDuration->links() }}
@endif
{{-- /.panel-body --}}
{{-- /.panel --}}
@endsection