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

Product Decisions This Supports

  • Performance Optimization Roadmap: Justifies investment in CLI profiling for long-running or resource-intensive commands (e.g., migrations, batch jobs, or data pipelines). Enables data-driven optimization of critical workflows.
  • Build vs. Buy: Avoids reinventing profiling infrastructure for CLI apps, leveraging XHProf’s battle-tested engine. Reduces dev time for observability tools.
  • Production Observability: Supports SRE/DevOps use cases like:
    • Identifying bottlenecks in scheduled jobs (e.g., Laravel queues, cron tasks).
    • Debugging slow API responses or CLI-heavy microservices.
    • Compliance/auditing for performance SLAs in production.
  • Feature Flagging: Enables gradual rollout of profiling (e.g., toggle via is_profiling_enabled) without disrupting workflows.
  • Multi-Environment Support: Configurable for both dev and prod, aligning with CI/CD pipelines (e.g., profile in staging before enabling in production).

When to Consider This Package

  • Adopt if:
    • Your CLI apps (Symfony/Laravel) have unpredictable performance or high resource usage (CPU/memory spikes).
    • You lack native profiling tools for PHP CLI (e.g., no Xdebug or Blackfire access).
    • You need production-safe profiling (low overhead, snapshot-based).
    • Your team prioritizes XHProf/XHGUI over alternatives like Tideways or Blackfire.
  • Look elsewhere if:
    • You’re using PHP < 8.2 or lack ext-xhprof (requires extension installation).
    • Your CLI apps are short-lived (profiling overhead may not justify benefits).
    • You prefer real-time profiling (this is snapshot-based, not live).
    • Your stack is non-Symfony/Laravel (e.g., pure PHP scripts, Node.js, or Go).
    • You need distributed tracing (this is single-process profiling).

How to Pitch It (Stakeholders)

For Executives: "This package lets us profile CLI applications in production—like migrations, batch jobs, or APIs—without disrupting workflows. By integrating XHProf (a lightweight, battle-tested profiler), we can identify and fix performance bottlenecks that impact reliability, cost, and user experience. For example, if our nightly data sync takes 2 hours instead of 1, we can pinpoint the slow queries or loops. It’s a low-risk, high-reward tool for optimizing our most critical backend processes, with minimal dev overhead."

For Engineering: *"This bundle automates CLI profiling for Symfony/Laravel apps using XHProf, giving us:

  • Production-safe snapshots (no runtime impact when disabled).
  • XHGUI integration for visualizing call graphs and flame charts.
  • Configurable triggers (e.g., profile only in prod or via env vars).
  • Zero reinvention: Leverages XHProf’s accuracy without custom dev work. Tradeoff: Requires ext-xhprof (add to Docker/host) and XHGUI setup, but pays off for long-running or flaky CLI tasks. Ideal for debugging migrations, queues, or scheduled jobs."*

For DevOps/SRE: *"This solves the ‘black box’ problem for CLI performance in production. Instead of guessing why a job is slow, we can:

  • Snapshot profiles of failed/long-running commands.
  • Compare versions (e.g., before/after a code change).
  • Correlate spikes with external events (e.g., traffic surges). Use case: Add to your incident response playbook for CLI-related outages."*
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.
daikazu/eloquent-salesforce-objects
unseen-codes/chat
romalytar/yammi-jobs-monitoring-laravel
kisame76/filament-db-table-state
nqxcode/laravel-lucene-search
dpfx/laravel-livewire-wizards
workos/workos-php-laravel
sofa/laravel-global-scope
nawasara/auth-primitives
adhocrat-io/arkhe-main
make-dev/orca-harpoon
itsemon245/lamet
baks-dev/dashboard
amoifr/pickle-panther-bundle
make-dev/orca
dmstr/symfony-system-resources-bundle
dmstr/symfony-job-queue-bundle
dmstr/openapi-json-schema-bundle
dmstr/keycloak-security-bundle
dmstr/doctrine-audit-log-bundle