Download the PHP package nowo-tech/performance-bundle without Composer

On this page you can find all versions of the php package nowo-tech/performance-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package performance-bundle

Performance Bundle

CI Packagist Version Packagist Downloads

⭐ Found this useful? Give it a star on GitHub! It helps us maintain and improve the project.

Symfony bundle for tracking and analyzing route performance metrics. Automatically records request time, database query count, and query execution time for performance analysis.

πŸ“‹ Compatible with Symfony 7.x and 8.x - Requires PHP 8.2 or higher and Symfony 7.0 or higher.

This bundle is FrankenPHP worker mode friendly.

What is this?

This bundle helps you track and analyze route performance in your Symfony applications:

Quick Search Terms

Looking for: route performance, performance monitoring, query tracking, Symfony performance, route metrics, performance analysis, database query tracking, request timing, profiling, performance bundle? You've found the right bundle!

Features

Installation

Install from Packagist

Then, register the bundle in your config/bundles.php:

Quick Start

  1. Configure the bundle (optional - works with defaults):

  2. Create the database table(s):

    Option A: Using the bundle commands (Recommended):

    Option B: Using Doctrine Schema:

  3. That's it! The bundle will automatically track route performance metrics in the configured environments.

For detailed installation steps (including sync-schema and migrations), see Installation Guide.

Requirements

Configuration

The bundle works with default settings. Create config/packages/nowo_performance.yaml. For the full reference and all options, see Configuration Guide.

Usage

Automatic Tracking

The bundle automatically tracks performance metrics for all routes (except ignored ones) in configured environments.

Manual Metrics Update

Use the command to inject sample metrics through the same PerformanceMetricsService pipeline as HTTP tracking (updates RouteData; may append RouteDataRecord rows when enable_access_records is enabled β€” same rules as live requests):

Accessing Metrics

Commands

See Commands for full documentation. Main commands:

How It Works

  1. Event Subscriber (PerformanceMetricsSubscriber) listens to kernel events
  2. On KernelEvents::REQUEST, it starts tracking:
    • Request start time
    • Query tracking is initialized by QueryTrackingConnectionSubscriber (applies DBAL middleware and resets counters)
  3. On KernelEvents::TERMINATE, it:
    • Calculates request time
    • Collects query count and execution time using multiple strategies:
    • Primary: QueryTrackingMiddleware (DBAL middleware for DBAL 3.x compatibility)
    • Fallback 1: DoctrineDataCollector from Symfony profiler
    • Fallback 2: Request attributes (_profiler, _profiler_profile)
    • Fallback 3: Stopwatch (time only)
    • Persists via PerformanceMetricsService: updates RouteData (identity + lastAccessedAt); when enable_access_records is on, inserts a RouteDataRecord for that request (subject to deduplication and per-route saveAccessRecords), unless metrics are recorded asynchronously (async: true with Messenger)

Query Tracking Architecture

The bundle uses a multi-layered approach for query tracking:

This ensures reliable query tracking across different Symfony and Doctrine versions.

Screenshots

The bundle provides a web dashboard to monitor and analyze route performance. Below are the main views.

Performance Metrics Dashboard

The main dashboard shows KPIs (total routes, records, average/max queries and request time), top routes by usage and by latency, filters (environment, sort, limit), an optional β€œOptional Dependencies Missing” alert with composer require hints, a Performance Trends chart (average and max request time over days), and a Routes table with columns: route name, HTTP method, status codes, access count, environment, request time, query time, total queries, memory usage, last accessed at, access records link, and review status.

Access: dashboard path configured in nowo_performance.dashboard.path (e.g. /performance). Use Diagnose, Advanced Statistics, Export CSV/JSON, Access Statistics by Hour, and Clear All Records from the toolbar.

Advanced Performance Statistics

This view provides statistical analysis to find optimization targets: Performance Recommendations (e.g. high average query count, request time outliers), Correlation Analysis (request time vs query time, query time vs query count, memory vs request time), Efficiency Analysis (query time ratio), Traffic Distribution and hot/bad routes, Routes Needing Attention (high request time or query count by percentile), and detailed Request Time, Query Time, Query Count, Memory Usage, and Access Count sections with min/mean/median/max, percentiles, and distribution histograms.

Access: Advanced Statistics button from the main dashboard. Requires enough route data for meaningful stats.

Access Statistics by Hour

When temporal access records are enabled (enable_access_records: true), this page shows access patterns over time: filters (date range, environment, route, status code), Total Accesses and period, Statistics by Hour of Day (line chart: access count and average response time), Statistics by Day of Week and by Month (bar charts), Access Heatmap (day of week vs hour), and a detailed table by hour with access count, average response time, and status code breakdown. You can Delete records matching filter from here.

Access: Access Statistics by Hour from the main dashboard. Requires enable_access_records: true and the routes_data_records table (see Configuration).

Entity structure (v2.x)

Since 2.0.0, metrics are normalized: RouteData holds route identity and review metadata; per-request metrics live in RouteDataRecord (and dashboard/API use aggregates built from records). See ENTITY_NORMALIZATION_PLAN.md.

RouteData (routes_data) β€” one row per logical route + environment:

RouteDataRecord (routes_data_records) β€” optional temporal log when enable_access_records: true (one row per request, deduplicated by request_id when set):

Listed metrics (request time, query counts, status code ratios, etc.) in the UI and exports are computed from records (or cached aggregates), not stored as scalar columns on RouteData.

Documentation

Additional documentation

Testing

Tests and coverage

License

The MIT License (MIT). Please see LICENSE for more information.

Contributing

We welcome contributions! Please see CONTRIBUTING.md for details.

Author

Created by HΓ©ctor Franco Aceituno at Nowo.tech


All versions of performance-bundle with dependencies

PHP Build Version
Package Version
Requires doctrine/dbal Version ^3.8.2 || ^4.0
doctrine/doctrine-bundle Version ^2.8 || ^3.0
doctrine/orm Version ^2.13 || ^3.0
nowo-tech/form-kit-bundle Version ^2.2
nowo-tech/ui-kit-bundle Version ^1.4
php Version >=8.2 <8.6
symfony/form Version ^7.0 || ^8.0
symfony/framework-bundle Version ^7.0 || ^8.0
symfony/security-bundle Version ^7.0 || ^8.0
symfony/stopwatch Version ^7.0 || ^8.0
symfony/translation Version ^7.0 || ^8.0
symfony/twig-bundle Version ^7.0 || ^8.0
symfony/ux-icons Version ^2.0 || ^3.0
symfony/var-exporter Version ^7.0 || ^8.0
symfony/yaml Version ^7.0 || ^8.0
twig/extra-bundle Version ^3.12
twig/string-extra Version ^3.12
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package nowo-tech/performance-bundle contains the following files

Loading the files please wait ...