Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Cli Snapshot Profiler Xhprof Bundle Laravel Package

aeatech/cli-snapshot-profiler-xhprof-bundle

Symfony bundle for profiling CLI commands with xhprof and exporting snapshots to XHGui. Supports PHP 8.2+, production-safe profiling toggles, app version tagging, xhprof flags, and flexible command/event matching to profile all or selected commands.

View on GitHub
Deep Wiki
Context7

AEATech - CLI snapshot profiler xhprof bundle

Code Coverage

The package contains symfony bundle to profile CLI applications with xhprof. It can be used for production profiling.

System requirements:

Installation (Composer):

composer require aeatech/cli-snapshot-profiler-xhprof-bundle

Auto installation

You can install it with custom recipe.

composer config extra.symfony.allow-contrib true
composer config --json --merge extra.symfony.endpoint '["https://api.github.com/repos/AEATech/recipes/contents/index.json?ref=main", "flex://defaults"]'
composer require aeatech/cli-snapshot-profiler-xhprof-bundle

Manual installation

Enable bundle in dev and prod env.

// config/bundles.php

return [
    // ...
    AEATech\CLISnapshotProfilerXhprofBundle\AEATechCLISnapshotProfilerXhprofBundle::class => ['dev' => true, 'prod' => true],
    // ...
];

Configuration

Symfony Flex generates a default configuration in config/packages/aea_tech_cli_snapshot_profiler_xhprof.yaml

aea_tech_cli_snapshot_profiler_xhprof:
    # Enable/Disable profiling
    is_profiling_enabled: false

    # Application info for snapshot naming
    app_version: '0.0.1'

    # XHGUI configuration
    xhgui:
        import_uri: '%env(string:AEA_TECH_CLI_SNAPSHOT_PROFILER_XHPROF_XHGUI)%'
        import_timeout: 1

    ###
    # xhprof configuration
    # - collect internal functions info
    # - collect memory allocation info
    ###
    xhprof:
        collect_additional_info: '1'
        flags:
            - !php/const Xhgui\Profiler\ProfilingFlags::MEMORY

    ###
    # Event matched configuration - START
    ###
    event_matcher:
        # Enable/Disable all commands profiling
        is_profile_all_commands: false

        # Enable profile by command name (\AEATech\CLISnapshotProfilerEventSubscriber\EventMatcher\CommandEventMatcher)
        command:
            is_enabled: false
            name_list:
                - 'app:command'
    ###
    # Event matched configuration - END
    ###

License

MIT License. See LICENSE for details.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
andydefer/laravel-task
helgesverre/toon
symfony/ai-mate
f1monkey/eve-esi-bundle
f-froehlich/symfony-validator
f-froehlich/api
ezsystems/templated-uri-bundle
ezsystems/stash-bundle
ezsystems/share-buttons-bundle
ezsystems/privacy-cookie-bundle
ezsystems/payment-paypal-bundle
ezsystems/payment-core-bundle
ezsystems/job-queue-bundle
ezsystems/hybrid-platform-ui
ezsystems/ezmigrationbundle
ezsystems/ezcommerce-econtent-installer
ezsystems/comment-bundle
ezsystems/apache-tika-bundle
ezar101/easyadmin-trix-extension-bundle
eyerim/oauth2-azure-bundle