PHPackages                             nowo-tech/performance-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. nowo-tech/performance-bundle

ActiveSymfony-bundle[Database &amp; ORM](/categories/database)

nowo-tech/performance-bundle
============================

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

v2.0.15(1mo ago)0829↓46.9%[2 PRs](https://github.com/nowo-tech/PerformanceBundle/pulls)MITPHPPHP &gt;=8.1 &lt;8.6CI passing

Since Jan 26Pushed 1mo agoCompare

[ Source](https://github.com/nowo-tech/PerformanceBundle)[ Packagist](https://packagist.org/packages/nowo-tech/performance-bundle)[ Docs](https://github.com/nowo-tech/performance-bundle)[ RSS](/packages/nowo-tech-performance-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (37)Versions (34)Used By (0)

Performance Bundle
==================

[](#performance-bundle)

[![CI](https://github.com/nowo-tech/PerformanceBundle/actions/workflows/ci.yml/badge.svg)](https://github.com/nowo-tech/PerformanceBundle/actions/workflows/ci.yml) [![Packagist Version](https://camo.githubusercontent.com/69742600421a199e8b43ae5aea03a4962698a39baae045bf6446906228eb6397/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e6f776f2d746563682f706572666f726d616e63652d62756e646c652e7376673f7374796c653d666c6174)](https://packagist.org/packages/nowo-tech/performance-bundle) [![Packagist Downloads](https://camo.githubusercontent.com/aecc652c1579b13d46ab8384e2f79613379a70f53637a4173a6c8ff9adf6ec78/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e6f776f2d746563682f706572666f726d616e63652d62756e646c652e737667)](https://packagist.org/packages/nowo-tech/performance-bundle) [![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE) [![PHP](https://camo.githubusercontent.com/8e58b490725ac49cc8e463c473173681b324c9d92d7854275a785db013ca3de7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312532422d3737374242343f6c6f676f3d706870)](https://php.net) [![Symfony](https://camo.githubusercontent.com/8fe7de83f11ab7ca74742794be56f9291632c8351a9ae5baea0bc1e9c4eb5a35/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53796d666f6e792d3625323025374325323037253230253743253230382d3030303030303f6c6f676f3d73796d666f6e79)](https://symfony.com) [![GitHub stars](https://camo.githubusercontent.com/709f7896ddf31205b58c33248c385311958ee8eb07ae4245ec0d1da4bab79737/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6e6f776f2d746563682f706572666f726d616e63652d62756e646c652e7376673f7374796c653d736f6369616c266c6162656c3d53746172)](https://github.com/nowo-tech/PerformanceBundle) [![Coverage](https://camo.githubusercontent.com/cd0704b56f1d56def350b6d0164316307bb2f47834225fd85443b6fb0059bc73/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f7665726167652d3130302532352d627269676874677265656e)](#tests-and-coverage)

> ⭐ **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 6.1+, 7.x, and 8.x** - This bundle requires Symfony 6.1 or higher.

What is this?
-------------

[](#what-is-this)

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

- 📊 **Automatic Performance Tracking** - Automatically tracks route performance metrics
- 🔍 **Query Analysis** - Counts and times database queries per route
- ⏱️ **Request Timing** - Measures request execution time
- 📈 **Performance Analysis** - Identifies slow routes and query-heavy endpoints
- 🎯 **Route Metrics** - Stores metrics per route and environment
- 🔧 **Manual Updates** - Command to manually set/update route metrics

Quick Search Terms
------------------

[](#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
--------

[](#features)

- ✅ Automatic route performance tracking via event subscribers
- ✅ Database query counting and execution time tracking
- ✅ Request execution time measurement
- ✅ **Memory usage tracking** - Track peak memory consumption per route
- ✅ **Access frequency tracking** - Track how often routes are accessed
- ✅ **HTTP status code tracking** - Track and calculate ratios for HTTP status codes (200, 404, 500, etc.)
- ✅ **Sub-request tracking** - Optional tracking of sub-requests (ESI, fragments, includes) in addition to main requests
- ✅ **Performance notifications** - Email, Slack, Teams, and webhook notifications for performance alerts
- ✅ Route data persistence in database
- ✅ Environment-specific metrics (dev, test, prod)
- ✅ Configurable route ignore list
- ✅ Command to manually set/update route metrics
- ✅ Support for multiple Doctrine connections
- ✅ Performance dashboard with filtering and sorting
- ✅ **Data export** - CSV and JSON export functionality
- ✅ **Record management** - Delete individual records (optional)
- ✅ **Review system** - Mark and edit records as reviewed with improvement tracking (optional)
- ✅ **Bootstrap and Tailwind CSS support** - Choose your preferred CSS framework
- ✅ Role-based access control for dashboard
- ✅ WebProfiler integration with ranking information
- ✅ **Chart.js integration** - Interactive performance charts
- ✅ **Symfony UX Twig Components** - Optional modern component system
- ✅ Symfony 6.1+, 7.x, and 8.x compatible
- ✅ **FrankenPHP** — Compatible with FrankenPHP; production Caddyfile can use worker mode, while **dev demos** use `APP_ENV=dev` so the image entrypoint swaps in `Caddyfile.dev` (no worker, comfortable local dev). See [docs/DEMO-FRANKENPHP.md](docs/DEMO-FRANKENPHP.md) and the demo READMEs.

Screenshots
-----------

[](#screenshots)

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

### Performance Metrics Dashboard

[](#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.

[![Performance Metrics Dashboard](docs/images/dashboard-main.png)](docs/images/dashboard-main.png)

*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

[](#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.

[![Advanced Performance Statistics](docs/images/dashboard-advanced-statistics.png)](docs/images/dashboard-advanced-statistics.png)

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

### Access Statistics by Hour

[](#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 Statistics by Hour](docs/images/dashboard-access-statistics.png)](docs/images/dashboard-access-statistics.png)

*Access: **Access Statistics by Hour** from the main dashboard. Requires `enable_access_records: true` and the `routes_data_records` table (see [Configuration](docs/CONFIGURATION.md#enable_access_records)).*

Installation
------------

[](#installation)

```
composer require nowo-tech/performance-bundle
```

[![Install from Packagist](https://camo.githubusercontent.com/25ba1d8b573a14c09873ad1c973fe17a929432bcf6cf4ceca6fa0910e34c5d08/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5061636b61676973742d696e7374616c6c2d3737374242343f6c6f676f3d636f6d706f736572)](https://packagist.org/packages/nowo-tech/performance-bundle)

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

```
