Skip to content

Latest commit

 

History

History
71 lines (57 loc) · 1.96 KB

console-app-info.md

File metadata and controls

71 lines (57 loc) · 1.96 KB

ConsoleAppInfoCollector collects information about the application.

It uses the following events to collect data:

Collected data

Common

Example:

console/commands.php

return [
    'app:hello' => \App\Command\HelloCommand::class,
];

App\Command\HelloCommand

final class HelloCommand extends Command
{
    protected static $defaultName = 'app:hello';

    protected function execute(InputInterface $input, OutputInterface $output): int
    {
        $output->writeln('Hello world!');
        return 0;
    }
}

Output:

{
    "applicationProcessingTime": 0.016509056091308594,
    "preloadTime": -0.014687061309814453,
    "applicationEmit": 0.0016329288482666016,
    "requestProcessingTime": 0.00018906593322753906,
    "memoryPeakUsage": 16445144,
    "memoryUsage": 16347512
}

Summary

{
    "console": {
        "php": {
            "version": "8.2.8"
        },
        "request": {
            "startTime": 1704625438.335058,
            "processingTime": 0.00018906593322753906
        },
        "memory": {
            "peakUsage": 20338080
        }
    }
}