Release v0.0.1
feat: enhance performance statistics dashboard with key insights and improved UI
- Added detailed insights for various performance metrics (request time, query time, etc.) to assist in optimization.
- Introduced a new section explaining statistical measures and their implications for performance.
- Enhanced the dashboard UI with informative alerts and improved layout for better user experience.
- Included visual indicators for outliers and performance thresholds to guide optimization efforts.
Changelog
Added
- Initial release
- Automatic route performance tracking via event subscribers
- Database query counting and execution time tracking
- Request execution time measurement
- HTTP Method tracking - Track HTTP method (GET, POST, PUT, DELETE, etc.) for each route
- New field in
RouteDataentity:httpMethod(STRING, nullable) - Automatically captured from request
- Displayed in dashboard with color-coded badges
- Included in CSV and JSON exports
- New field in
- Memory usage tracking - Track peak memory consumption per route
- New field in
RouteDataentity:memoryUsage(BIGINT, nullable) - Automatically tracked during request processing
- Displayed in dashboard and exports
- Can be set via
nowo:performance:set-route --memorycommand
- New field in
- Route access frequency tracking - Track how often routes are accessed
- New fields:
accessCount(INTEGER, default: 1) andlastAccessedAt(DATETIME_IMMUTABLE, nullable) - Automatically incremented on each route access
- Displayed in dashboard with badge showing access count
- Can be sorted by access count in dashboard
- New fields:
- Record management system - Delete individual records from the dashboard
- New configuration option:
nowo_performance.dashboard.enable_record_management(boolean, default:false) - Delete button for each record in the dashboard
- CSRF protection for delete operations
- Role-based access control (uses dashboard roles)
- New configuration option:
- Record review system - Comprehensive review system for performance records
- New configuration option:
nowo_performance.dashboard.enable_review_system(boolean, default:false) - New fields in
RouteData:reviewed(boolean),reviewedAt(DATETIME_IMMUTABLE),queriesImproved(boolean, nullable),timeImproved(boolean, nullable),reviewedBy(string, nullable) - Review modal in dashboard to mark records as reviewed
- Visual indicators for review status and improvements
- Indexes added for
reviewedandreviewedAtfields
- New configuration option:
- Data export functionality - CSV and JSON export capabilities
- Export buttons in dashboard (CSV and JSON)
- Exports respect current filters and sorting
- Includes all fields: route name, HTTP method, environment, metrics, memory usage, access count, review status
- Proper CSV encoding (UTF-8 with BOM)
- JSON export with metadata (environment, export date)
- Performance ranking in Web Profiler - Ranking information in PerformanceDataCollector
- Shows access frequency (how many times route was accessed)
- Shows ranking position by request time (1 = slowest)
- Shows ranking position by query count (1 = most queries)
- Displays total routes count for context
- Visual indicators for slow routes (top 3) and routes needing attention (top 10)
- Shows database storage status and table existence
- Indicates whether current route's performance data is being saved to database
- Displays reason if data is not being saved (disabled, environment not tracked, etc.)
- Always visible in toolbar, even when disabled, to provide status information
- New console commands:
nowo:performance:create-table- Create the performance metrics database table with all indexesnowo:performance:diagnose- Comprehensive diagnostic report of bundle configuration and statusnowo:performance:check-dependencies- Check status of optional dependencies (e.g., Symfony UX TwigComponent)
- Database table creation command -
nowo:performance:create-tablecommand for easy table setup- Checks if table exists before creating
--forceoption to drop and recreate table--updateoption to add missing columns--connectionoption to specify Doctrine connection- Shows SQL statements being executed
- Provides alternative migration commands if needed
- Advanced filtering in dashboard - Enhanced filtering capabilities
- Filter by route name pattern (LIKE search)
- Filter by multiple route names (OR condition)
- Filter by request time range (min/max)
- Filter by query count range (min/max)
- Filter by query time range (min/max)
- Filter by date range (createdAt)
- Sort by access count
- Caching layer -
PerformanceCacheServicefor improved dashboard performance- Caches statistics calculations
- Caches environment lists
- Automatic cache invalidation on metrics updates
- Configurable TTL (default: 1 hour)
- Symfony UX Twig Components support - Optional integration with Symfony UX TwigComponent
- Uses Twig Components when
symfony/ux-twig-componentis installed - Falls back to traditional Twig includes if not available
- Better performance and maintainability with components
- Dependency validation with informative messages
- Uses Twig Components when
- Chart.js integration - Interactive charts in dashboard
- Performance trends visualization
- API endpoint
/api/chart-datafor chart data - Supports filtering by environment and route
- Alert when no data is available
- Role-based access control for performance dashboard - Restrict access to the performance dashboard
- New configuration option:
nowo_performance.dashboard.roles(array, default:[]) - Access control is enforced in
PerformanceController::index()method - Supports multiple roles with OR logic (user needs at least one role)
- New configuration option:
- QueryTrackingMiddleware for DBAL 3.x compatibility - Custom DBAL middleware to intercept and track database queries
- Automatic query interception via DBAL middleware
- Static methods for query count and execution time tracking
- Multiple fallback strategies for query metrics collection
- Support for Doctrine DataCollector as fallback
- Version-aware middleware registration (DoctrineBundle 2.x vs 3.x)
QueryTrackingConnectionSubscriberfor automatic middleware application
- Route data persistence in database
- Environment-specific metrics (dev, test, prod)
- Configurable route ignore list
- Command to manually set/update route metrics (
nowo:performance:set-route) - Support for multiple Doctrine connections
- Configurable table name for storing metrics
- Performance dashboard with filtering and sorting capabilities
- WebProfiler integration with PerformanceDataCollector
- Symfony 6.1+, 7.x, and 8.x compatibility
- Comprehensive test coverage (123 tests, 34% code coverage)
- Full documentation
- Date format configuration - Customizable date formats for dashboard display
- New configuration:
nowo_performance.dashboard.date_formats.datetime(default: 'Y-m-d H:i:s') - New configuration:
nowo_performance.dashboard.date_formats.date(default: 'Y-m-d H:i')
- New configuration:
- Table status checking - Service to verify database table existence and structure
TableStatusCheckerservice- Displays warnings in dashboard if table is missing or incomplete
- Shows table status in Web Profiler collector
- Symfony Flex recipe - Automatic bundle configuration via Symfony Flex
- Recipe for automatic setup
- Default configuration files
- Post-install instructions
- Advanced Performance Statistics page - Comprehensive statistical analysis page
- Detailed statistics for all metrics (Request Time, Query Time, Query Count, Memory Usage, Access Count)
- Statistical measures: Mean, Median, Mode, Standard Deviation
- Percentiles: P25, P50, P75, P90, P95, P99
- Distribution histograms with Chart.js for each metric
- Outlier detection and identification
- Routes needing attention section (top 95th percentile)
- Key insights and interpretation guides for each metric
- Contextual information explaining what each chart shows
- Visual indicators for optimization targets
- Metric-specific guidance (e.g., N+1 detection, memory optimization, hot path identification)
- Symfony Translation component support - Full internationalization support
symfony/translationas bundle dependency- Complete translation files for English, Spanish, Czech, Turkish, and Polish
- All UI elements are translatable
- Translation keys for dashboard, filters, statistics, and messages
- Demo applications configured with translation support
Changed
- Improved query metrics collection - Enhanced
getQueryMetrics()method with multiple strategies:- QueryTrackingMiddleware (primary method)
- Doctrine DataCollector from profiler (fallback)
- Request attributes (fallback)
- Stopwatch (time only, fallback)
- Command option shortcut fix - Removed conflicting shortcut
-qfromqueriesoption innowo:performance:set-routecommand - Enhanced command help - All commands now include comprehensive help text
- Database schema improvements - Added composite indexes for better query performance
- Index on
env + namefor route lookups - Index on
env + requestTimefor sorting - Index on
env + accessCountfor access frequency sorting - Index on
createdAtfor date filtering - Index on
reviewedandreviewedAtfor review system
- Index on
- Dashboard UI improvements - Enhanced dashboard with new features
- Export buttons (CSV/JSON) in header
- Clear All Records button with referer redirect
- Access count and last accessed date columns
- Review status column with visual indicators
- Action buttons (delete, review) conditionally displayed
- Improved advanced filters layout with visual grouping
- HTTP Method column with color-coded badges (GET, POST, PUT, DELETE, etc.)
- Table status warnings when database table is missing or incomplete
- Informative alerts when chart data is not available
- Enhanced filter organization with grouped sections and icons
- Repository methods - Added new methods to
RouteDataRepositorygetRankingByRequestTime()- Get ranking position by request time (accepts RouteData entity)getRankingByQueryCount()- Get ranking position by query count (accepts RouteData entity)getTotalRoutesCount()- Get total number of routes in environmentdeleteById()- Delete single record by IDmarkAsReviewed()- Mark record as reviewed with improvement flags
- Query optimization - Optimized duplicate queries in repository methods
getRankingByRequestTime()andgetRankingByQueryCount()now accept RouteData entity directly- Reduced duplicate
findByRouteAndEnv()calls - Improved dashboard performance by reusing fetched data for statistics
Fixed
- Query tracking compatibility - Fixed query tracking to work correctly with DBAL 3.x by implementing a custom middleware instead of relying on deprecated
SQLLogger - Connection interface compatibility - Fixed
QueryTrackingConnectionto properly implement all required methods fromDoctrine\DBAL\Driver\Connectioninterface - Server version method signature - Fixed
getServerVersion()return type to matchServerVersionProviderinterface requirements - Query tracking registration - Fixed middleware registration to work with both DoctrineBundle 2.x and 3.x
- Automatic version detection
- YAML configuration for DoctrineBundle 2.x
- Reflection-based registration for DoctrineBundle 3.x
- Enhanced
QueryTrackingMiddlewareRegistryfor robust middleware application
- Cache service autowiring - Fixed
PerformanceCacheServiceto handle cases wherecache.appmight not be available - Data collector query metrics - Fixed
PerformanceDataCollectorto fetch query metrics directly fromQueryTrackingMiddlewareif not set - Access count and last accessed display - Fixed Twig templates to use getter methods instead of direct property access
- Table naming - Fixed table name to use
routes_data(plural) consistently- Added
#[ORM\Table(name: 'routes_data')]to RouteData entity - Updated
TableNameSubscriberto correctly override table name - Fixed index column names to use snake_case
- Added
- Division by zero - Fixed division by zero error in statistics calculation when all values are identical
- Bundle alias - Fixed bundle alias resolution by renaming bundle class to
NowoPerformanceBundle - Route import - Fixed route import path to use correct bundle alias
@NowoPerformanceBundle - Twig syntax errors - Fixed duplicate and missing Twig tags in RoutesTable component
- Deprecation warnings - Fixed
Doctrine\DBAL\Schema\AbstractAsset::getNamedeprecation warning
Security
- Dashboard access control - The performance dashboard supports role-based access control to restrict access to authorized users only
- CSRF protection - All form submissions (delete, review, clear) are protected with CSRF tokens