Skip to content

WebAppInfo Collector

Collects web application performance metrics — request processing time, preload time, emit time, memory usage, and adapter name.

WebAppInfo Collector panel

What It Captures

FieldDescription
applicationProcessingTimeTotal application processing time
requestProcessingTimeRequest handling time
applicationEmitResponse emit time
preloadTimeBootstrap/preload time
memoryPeakUsagePeak memory usage in bytes
memoryUsageCurrent memory usage in bytes
adapterFramework adapter name

Data Schema

json
{
    "applicationProcessingTime": 0.045,
    "requestProcessingTime": 0.032,
    "applicationEmit": 0.001,
    "preloadTime": 0.012,
    "memoryPeakUsage": 8388608,
    "memoryUsage": 6291456,
    "adapter": "symfony"
}

Summary (shown in debug entry list):

json
{
    "web": {
        "adapter": "symfony",
        "request": {
            "startTime": 1711878000.100,
            "processingTime": 0.032
        },
        "memory": {
            "peakUsage": 8388608
        }
    }
}

Contract

php
use AppDevPanel\Kernel\Collector\Web\WebAppInfoCollector;

$collector->markApplicationStarted();
$collector->markRequestStarted();
// ... request processing ...
$collector->markRequestFinished();
$collector->markApplicationFinished();

How It Works

Framework adapters call the mark*() methods at key points in the request lifecycle — application boot, request start, request end, and response emit. Memory metrics are captured via memory_get_peak_usage() and memory_get_usage().

Debug Panel

The WebAppInfo data is displayed in the top bar of every debug entry as processing time and memory usage, rather than having a dedicated panel.

Released under the MIT License.