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

Xhgui Collector Laravel Package

perftools/xhgui-collector

Standalone XHProf data collector for storing profiles compatible with XHGUI (0.2–0.9). Supports PHP 5.3+, minimal dependencies, configurable storage/collection. Use via auto_prepend_file (web) or header for CLI. Being phased out; use perftools/php-profiler for new installs.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Performance-Driven Roadmap: Justifies investment in profiling infrastructure for high-traffic Laravel applications (e.g., SaaS platforms, e-commerce) where latency directly impacts revenue. Aligns with OKRs like "Reduce API response time by 20% in 6 months" by enabling data-driven optimizations.
  • Build vs. Buy: Avoids reinventing profiling tools (e.g., custom XHGUI setups or third-party SaaS) while offering open-source flexibility. Reduces technical debt compared to proprietary solutions.
  • Debugging Workflows: Enables root-cause analysis for slow endpoints (e.g., Laravel queues, real-time features) by isolating custom code from framework noise. Critical for teams adopting event-driven architectures or WebSockets.
  • Cost Optimization: Lowers cloud infrastructure costs by identifying inefficient queries or external API calls early in development (e.g., reducing Lambda cold starts or database load).
  • Developer Productivity: Reduces time-to-resolution for performance bugs by 30–50% (based on anecdotal benchmarks from similar tools like Blackfire). Prioritizes features like profiler.skip_built_in to focus dev effort on actionable insights.

When to Consider This Package

Adopt If:

  • Your Laravel app has performance-critical paths (e.g., payment processing, real-time analytics) where micro-optimizations (1–5ms savings) compound into significant cost/UX improvements.
  • You’re debugging production issues where profiling data is too noisy (e.g., 80% of traces are framework/library functions).
  • Your team lacks budget for enterprise tools (e.g., New Relic, Datadog) but needs professional-grade profiling.
  • You’re migrating legacy code and need to compare old vs. new performance without framework interference.
  • Your CI/CD pipeline includes performance tests, and you need lightweight profiling to validate optimizations (e.g., in GitHub Actions or GitLab CI).

Look Elsewhere If:

  • You need full-stack observability (e.g., including PHP built-ins for baseline comparisons). Consider Tideways, Blackfire, or Xdebug instead.
  • Your use case is low-performance (e.g., admin panels, static sites) where profiling overhead isn’t justified.
  • Your team doesn’t have PHP expertise to configure or interpret profiling data. Tools like Laravel Telescope or Sentry may offer simpler UIs.
  • You’re constrained by MongoDB dependencies (this package requires MongoDB 2.2+). If your stack uses Redis or SQL, alternatives like spatie/laravel-profiler may fit better.
  • You’re all-in on Laravel Forge/Vapor and prefer managed services (e.g., Laravel Scout’s built-in profiling or Bref’s XHProf integration).

How to Pitch It (Stakeholders)

For Executives (CTO/VP Engineering):

*"This package lets us cut performance debugging time in half by focusing only on our custom code—not Laravel or PHP internals. For example, at [Competitor X], they reduced their API latency by 30% in 3 months using similar tools, saving $50K/month in cloud costs. Here’s how it works:

  • No upfront cost: Uses open-source XHGUI (free) vs. $200+/month for SaaS alternatives.
  • Actionable insights: Ignores built-in functions (e.g., array_map) to highlight only our slow queries or business logic.
  • Scalable: Works in staging/production, so we can catch regressions early in CI or debug live issues without downtime. Recommendation: Pilot this in our highest-traffic microservice (e.g., Orders API) and measure dev time saved. If it reduces bug resolution by 20%, we can roll it out to all performance-critical paths."*

For Engineering (Devs/Tech Leads):

*"This is a drop-in profiler that makes XHGUI 10x more useful for Laravel apps. Key perks:

  1. Skip built-ins: Toggle profiler.skip_built_in = true to ignore PHP’s strlen(), array_merge(), etc.—no more scrolling past framework noise.
  2. Laravel-friendly: Works with auto_prepend_file or middleware. Example setup:
    // config/profiler.php
    'skip_built_in' => env('PROFILER_SKIP_BUILT_IN', false),
    'profiling_ratio' => env('PROFILING_RATIO', 100), // Profile 100% of requests (adjust for staging)
    
  3. CLI support: Profile scripts with php -d auto_prepend_file=/vendor/perftools/xhgui-collector/external/header.php script.php.
  4. MongoDB-backed: Stores data in a searchable UI (XHGUI) for deep dives. Why now? Our [Slow Endpoint] ticket is blocking releases—this lets us find the real bottleneck in <1 hour instead of days. Risk: None. It’s a config toggle; worst case, we revert if data is incomplete."*

For Product (PMs/POs):

*"This tool helps us deliver faster features by reducing dev time on performance bugs. For example:

  • Feature X: If our new checkout flow is slow, this will tell us if it’s our code, a DB query, or a third-party API.
  • Cost savings: Faster APIs = lower cloud bills (e.g., fewer Lambda invocations).
  • User impact: Even 100ms faster load times can boost conversion rates (per Google’s study). Ask: Should we prioritize this for our next high-traffic release? It’s a low-effort, high-reward experiment."*
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.
besmartand-pro/php-quality-config
sentix/ai-chatbot
codifyo/ts-generator-bundle
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor