protected function beforeRequest(HTTPRequest $request)
    {
        DebugBar::withDebugBar(function (\DebugBar\DebugBar $debugbar) {
            /** @var DebugBar\DataCollector\TimeDataCollector $timeData */
            $timeData = $debugbar->getCollector('time');

            if (!$timeData) {
                return;
            }

            if (isset($_SERVER['REQUEST_TIME_FLOAT'])) {
                $timeData = $debugbar['time'];
                $timeData->addMeasure(
                    'framework boot',
                    $_SERVER['REQUEST_TIME_FLOAT'],
                    microtime(true)
                );
            }
            $timeData->startMeasure('pre_request', 'pre request');
        });
    }