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

Symfony Performance Analyzer Laravel Package

2a/symfony-performance-analyzer

View on GitHub
Deep Wiki
Context7
1.0.1

update package name

1.0.0

Release Notes: Symfony Performance Analyzer Bundle v1.0.0

Release Date: May 30, 2025 (12:00 PM CEST)

Introducing the Symfony Performance Analyzer Bundle, a toolkit to optimize Symfony applications with performance metrics, N+1 query detection, AI-driven recommendations, and extensible analyzers. Learn more at https://symfony-performance-analyzer.example.com.

Features

  • Performance Metrics: Track request time, database queries, memory, and cache efficiency.
  • N+1 Query Detection: Identify and resolve N+1 query issues.
  • Code Analysis: Detect issues (e.g., unnecessary loops) with CodeAnalyzer.
  • AI Recommendations: Get suggestions via AiRecommendationService using AI_API_KEY, AI_ENDPOINT, and AI_MODEL.
  • Visual Dashboard: View metrics at /performance-dashboard with local Chart.js (no CDN).
  • Reporting: Generate JSON, CSV, or HTML reports with ReportGenerator.
  • Custom Analyzers: Extend with AnalyzerInterface and aa_performance_analyzer.analyzer tag.
  • Cleanup: Remove resources (tables, assets, logs) on composer remove with PurgePackageCommand.
  • Symfony Support: Compatible with Symfony 6.0+ and 7.0+.

Installation

composer require aa/performance-analyzer

Enable in config/bundles.php:

return [
    AA\PerformanceAnalyzer\PerformanceAnalyzerBundle::class => ['all' => true],
];

Install assets:

php bin/console assets:install --symlink

Configure in config/packages/aa_performance_analyzer.yaml:

aa_performance_analyzer:
    enabled: true
    base_template: '[@PerformanceAnalyzer](https://github.com/PerformanceAnalyzer)/dashboard.html.twig'
    collectors:
        database: true
        memory: true
        http: true
        cache: true
    ai_integration:
        enabled: false
    thresholds:
        slow_query_time: 100
        memory_limit_warning: 128

Add AI settings to .env:

AI_API_KEY=your-api-key-here
AI_ENDPOINT=https://api.openai.com/v1/chat/completions
AI_MODEL=gpt-4-turbo

Usage

Analyze performance:

php bin/console aa:analyze:performance --output=json

View dashboard at /performance-dashboard.

Breaking Changes

  • Initial release; no breaking changes. Requires PHP ^8.0 and Symfony ^6.0|^7.0.

Known Issues

  • CodeAnalyzer’s analyze() is a placeholder; use analyzeFile() for file analysis.
  • AI recommendations require valid API credentials; fallback recommendations provided otherwise.

Contributing

See README for contributing guidelines, including forking and pull requests.

License

MIT License. See LICENSE.

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.
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui