<?php

namespace App\Framework\Performance\EventHandler;

use App\Framework\Core\Events\ApplicationBooted;
use App\Framework\Core\Events\OnEvent;
use App\Framework\Performance\PerformanceMeter;

final readonly class MeasureApplicationBootHandler
{
    public function __construct(private PerformanceMeter $meter) {}

    #[OnEvent]
    public function onApplicationBooted(ApplicationBooted $event): void
    {
        $this->meter->mark('application:booted');
    }
}
