igorkasyanchuk/rails_performance
58.2
Adequate · 20 September 2026
2.5k
lines of production code
Ruby
with JavaScript
1
measurement over time
What this system is
This system is a Rails engine that provides comprehensive performance monitoring and dashboarding for Ruby on Rails applications. It instruments HTTP requests, background jobs (Sidekiq, Delayed Job), API endpoints (Grape), and system resources, storing the metrics in Redis. The system exposes a configurable, real-time dashboard that visualizes these metrics through charts and tables, supporting features like CSV export and custom event tracking.
How it got here
2020 — v1.6.0 architecture overhaul
25 changes.
This period focused on a major architectural refactoring of Rails Performance, shifting from a middleware-based approach to a modular instrumentation model with dedicated collectors and models. The update introduced comprehensive support for tracking diverse events such as Sidekiq, Grape, and custom metrics, alongside a complete UI redesign using Bulma and ApexCharts. Extensive test coverage was added to validate the new data structures, reporting infrastructure, and integration with modern Rails versions.
2021–2026 — Dashboard overhaul and extended tracing
11 changes.
This period focused on expanding the library's tracing capabilities to include views, databases, and various background job frameworks, alongside introducing a new install generator for easier setup. The dashboard underwent a significant redesign with a modernized UI, custom JavaScript components for real-time updates, and a modular widget system. Additionally, system resource monitoring was added, and compatibility was extended to support Rails versions up to 8.1.
Features
Add RailsPerformance helper for UI rendering and data extraction
Introduces the RailsPerformanceHelper module to provide view helpers for the Rails Performance dashboard. This includes logic to format durations with appropriate CSS classes for visual alerts, extract duration values from both strings and hash inputs, generate status tags based on HTTP status codes, and display bot versus real user icons. It also adds utilities for shortening file paths, linking to paths, formatting datetime stamps, and determining active navigation sections.
app/helpers · high confidence
Add install generator for initial configuration
Users can now run \bin/rails generate rails\_performance:install\ to automatically create \config/initializers/rails\_performance.rb\. This initializer provides a comprehensive default configuration for the gem, including settings for Redis, data retention windows, slow request thresholds, authentication, ignored paths, and the home link, allowing for quick setup and easy customization.
lib/generators · high confidence
Added performance monitoring extensions for Sidekiq, Delayed Job, Rake, Grape, and custom events
The library now includes new extension modules that automatically capture performance metrics for background jobs and specific framework components. Sidekiq and Delayed Job jobs are now tracked with duration, status, and worker details. Rake task execution is monitored, with support for skipping specific tasks like asset precompilation. Grape API endpoint performance is recorded, capturing status, format, and method. Additionally, a new custom event tracking API allows users to manually measure and store the duration and status of arbitrary code blocks.
_lib/rails\performance/gems · high confidence
Added view and database tracing extensions
New extension modules have been added to intercept Rails view rendering and database query execution. The View extension hooks into the info logging method to capture trace events for view groups, while the Db extension hooks into SQL event handling to capture trace events for database groups, including query duration and SQL text. These changes enable detailed performance tracing for views and database interactions within the RailsPerformance library.
_lib/rails\performance/extensions · high confidence
Introduces thread-local request tracking context
A new CurrentRequest class has been added to manage per-thread request state, storing a unique request ID, a list of tracings, and flags for ignoring or recording data. This component provides methods to initialize the context, retrieve the current request object, and perform cleanup by clearing the thread-local storage, ensuring that performance trace data is correctly scoped to individual requests within the RailsPerformance library.
_lib/rails\performance/thread · high confidence
Introduction of background resource monitoring
A new background thread has been added to periodically collect system resource metrics and persist them to the database. This monitor runs continuously, gathering data from configured widgets and storing snapshots (including server ID, context, role, and timestamp) as JSON records, with errors logged to the Rails logger.
_lib/rails\_performance/system\monitor · high confidence
New Rails Performance dashboard with CSV export and permissive CSP
This change introduces the core controller structure for the RailsPerformance dashboard, enabling users to view performance metrics for requests, resources, Sidekiq, DelayedJob, Grape, Rake tasks, and custom events. A key new capability is the ability to export data from reports (such as crashes, requests, and slow requests) directly to CSV files. The dashboard also implements a permissive Content Security Policy to ensure charts and widgets render correctly without blocking inline scripts or styles, and supports configurable URL options and access verification.
_app/controllers/rails\performance · high confidence
New model classes for structured performance data storage
The library introduces a suite of new model classes in \lib/rails\_performance/models\ to structure and persist performance metrics into Redis. These include \RequestRecord\ for HTTP request details (controller, action, duration, exceptions), \SidekiqRecord\ and \DelayedJobRecord\ for background job tracking, \RakeRecord\ for task execution, \GrapeRecord\ for API endpoint metrics, \CustomRecord\ for user-defined events, \ResourceRecord\ for system resources, and \TraceRecord\ for request tracing. Each model defines how data is parsed from Redis keys/values and how it is saved, enabling more granular and organized performance reporting.
_lib/rails\performance/models · high confidence
New performance report types and base reporting infrastructure
The \lib/rails\_performance/reports\ directory now includes a new \BaseReport\ class that standardizes time-series data generation, timezone handling, and data nullification for reports. Additionally, several new report implementations have been added to provide deeper performance insights: \AnnotationsReport\ for chart annotations, \PercentileReport\ for calculating p50/p95/p99 latency metrics, \ResponseTimeReport\ and \ThroughputReport\ for time-based aggregations, \RequestsReport\ for grouped request statistics (including averages and percentiles), \RecentRequestsReport\ for a configurable list of recent activity, \SlowRequestsReport\ for filtering requests exceeding a duration threshold, and \BreakdownReport\ and \CrashReport\ for detailed event listings.
_lib/rails\performance/reports · high confidence
New shared header navigation component with dynamic menu items
A new shared partial for the application header has been introduced, providing a responsive navigation bar that dynamically renders menu links based on available integrations. The menu includes standard performance views (Dashboard, Requests Analysis, Recent Requests, Slow Requests, 500 Errors) and conditionally displays links for System resources, Sidekiq, Delayed::Job, Grape, Rake tasks, and Custom Events only when the corresponding libraries are defined or enabled. Additionally, a customizable home link button has been added to the navigation end, allowing users to navigate to an external or internal home page as configured.
_app/views/rails\performance/shared · high confidence
Rails request tracking and query filtering implementation
The library now includes specific middleware and query logic for tracking Rails application performance. A new \Middleware\ class captures request details (such as controller, action, status, and custom data) and stores them, while a separate \MiddlewareTraceStorerAndCleanup\ class handles trace records and ensures the performance monitoring is skipped for the library's own mount path. Additionally, a \QueryBuilder\ class has been added to construct database queries for filtering these recorded requests by controller, action, format, and status.
_lib/rails\performance/rails · high confidence
Removals
Removal of legacy RailsPerformanceController
The legacy \RailsPerformanceController\ has been removed from the application. This change eliminates the previous \index\ action that exposed performance data via \RailsPerformance.dump\ and \GlobalReport\, indicating a shift away from this specific reporting mechanism in favor of newer implementations.
app/controllers · high confidence
Behavioural changes
Configurable mount path and expanded dashboard routes
The RailsPerformance engine now supports mounting at a configurable path via the \RailsPerformance.mount\_at\ setting instead of the hardcoded \/rails/performance\. Additionally, the dashboard now exposes dedicated routes for viewing recent requests, crashes, slow queries, traces, summaries, and integrations with Sidekiq, Delayed Job, Grape, Rake, and custom events, providing a more granular interface for performance monitoring.
config · high confidence
Introduce structured widget classes for dashboard components
The dashboard UI now uses a new set of Ruby widget classes to define and render its visual components. This change introduces base classes for cards and charts, along with specific implementations for displaying performance metrics (such as CPU, memory, and disk usage charts, and percentile cards) and data tables (including recent requests, slow requests, and job queues). This structure makes the dashboard's data-driven pages more modular and consistent.
_lib/rails\performance/widgets · high confidence
Major configuration overhaul and expanded monitoring capabilities
The library has been significantly refactored to support a wider range of monitoring features and more granular configuration. Default behavior has changed: the data retention duration is now 4 hours (previously 24), and the dashboard is mounted at /rails/performance by default. New configuration options allow users to enable HTTP Basic authentication, define ignored endpoints and paths, customize the home link, and control the inclusion of Rake tasks, custom events, and Sidekiq/Delayed Job data. The internal structure has also shifted from a flat set of files to a modular organization with dedicated models, reports, and widgets, and the executable permission bit has been removed from the main library file.
lib · high confidence
New dashboard styling and layout support
Added new CSS stylesheets (panel.css, responsive.css, style.css) to support the revamped dashboard layout. These styles introduce a slide-in panel component for overlays, responsive adjustments for fluid containers and sections, and specific styling for the new row-based layout, charts, loaders, and footer. The changes also include styles for the extracted rails-performance-chart custom element and various UI icons.
_app/engine\assets/stylesheets · high confidence
Rails Performance dashboard UI refactored into data-driven widgets
The Rails Performance dashboard views have been restructured to use a modular, data-driven architecture. Pages like the dashboard, requests, and system resources now render reusable components (cards, charts, and tables) via a \@widgets\ collection, allowing for easier configuration and layout changes. This includes the introduction of a custom \\<rails-performance-chart\>\ element for rendering charts and a generic \\_table.html.erb\ partial that supports features like CSV export and auto-update toggles. Specific table views for crashes, custom events, delayed jobs, Grape requests, rake tasks, and Sidekiq jobs have been extracted into dedicated partials to handle their unique data structures.
_app/views/rails\_performance/rails\performance · high confidence
Rails Performance dashboard layout updated to use Bulma CSS and ApexCharts
The Rails Performance dashboard layout has been updated to use the Bulma CSS framework (v0.9.4) for styling and ApexCharts (v3.45.0) for data visualization, replacing previous dependencies. The layout now includes support for Content Security Policy meta tags on Rails 5.2+ and utilizes importmap for JavaScript dependencies including @rails/ujs, jQuery, and idiomorph. This change affects the visual appearance and chart rendering capabilities of the performance monitoring interface.
_app/views/rails\performance/layouts · high confidence
Rails Performance v1.6.0: Major architecture overhaul and new event tracking
Rails Performance has been upgraded to version 1.6.0, introducing a significant architectural shift from the previous middleware-based approach to a modern instrumentation model using Rails log subscribers and dedicated collectors. This change removes the legacy \Middleware\, \BaseReport\, \FullReport\, and \GlobalReport\ classes, replacing them with \Rails::Middleware\, \MetricsCollector\, and a new \SystemMonitor::ResourcesMonitor\ for tracking server resources. The update also adds support for tracking custom events via a new \Interface\ module, integrates with Sidekiq, Grape, and Delayed Job, and isolates the engine's assets and namespace. Additionally, the data schema has been updated to version 1.0.2, and the application now uses UTC time for all recorded metrics.
_lib/rails\performance · high confidence
Rails performance dashboard UI refactored to use a panel-based layout
The Rails performance dashboard has been restructured from a full-page view into a slide-out panel component. The previous implementation, which relied on inline CSS and JavaScript (including Highcharts for request graphs and tables), has been removed in favor of a new \\_panel.html.erb\ partial that uses Bulma CSS classes and a \data-skip-autoupdate\ attribute for morph-based updates. This change shifts the user experience from a standalone page to an integrated overlay panel, removing the direct dependency on the Highcharts library for this specific view.
_app/views/rails\performance · high confidence
Redesigned performance charts with auto-update and morphing
The JavaScript assets for the performance dashboard have been rewritten to use custom elements, introducing a new \<rails-performance-chart\> component that automatically updates its visualizations when underlying data changes, and a new \<rails-performance-autoupdate\> component that periodically refreshes the page using Idiomorph morphing. This change replaces the previous manual update logic with a more robust, declarative approach to keeping charts and the dashboard in sync with real-time performance data.
_app/engine\assets/javascripts · high confidence
Refactored data access and reporting architecture with new widget and event models
The Rails Performance library has undergone a significant structural refactoring to support more granular data handling and visualization. A new \DataSource\ class centralizes query building and Redis retrieval for various record types (requests, sidekiq, delayed\_job, grape, rake, custom, and resources), replacing previous ad-hoc data fetching. Reporting logic has been reorganized into specific report classes (\ResourcesReport\, \TraceReport\) that utilize a new \Widgets\ system (starting with \Widgets::Base\) to render chart data. Additionally, a new \Events::Record\ model enables the storage and retrieval of custom chart annotations with configurable styling, while the \Collection\ model has been moved under \Models\ and updated to support adding individual records and grouping by multiple types. These changes provide a more modular foundation for performance data visualization and custom event tracking.
_rails\performance · high confidence
Refactored metrics collection to support endpoint ignoring and exception tracking
The metrics collection logic has been moved to a new class, \RailsPerformance::Instrument::MetricsCollector\, and now supports ignoring specific endpoints via \ignored\_endpoints\ and \ignored\_paths\ configurations. The collector also tracks exception details (\exception\ and \exception\_object\) and defers saving the record to the middleware via \CurrentRequest\, rather than writing directly to Redis immediately.
_lib/rails\performance/instrument · high confidence
Removed executable permissions from asset manifest file
The \rails\_performance\_manifest.js\ file in the assets configuration directory no longer has executable permissions. This change corrects the file mode to standard read/write, ensuring the manifest is treated as a regular data file rather than a script, which aligns with how asset manifests are processed by the Rails asset pipeline.
app/assets/config · high confidence
Standardize linting in default rake task and update test matrix
The default rake task now runs standardrb checks after tests, ensuring code style compliance is part of the standard development workflow. Additionally, the Appraisals file has been updated to test against Rails 7.2, 8.0, and 8.1, expanding the supported version matrix for developers.
(repo-wide) · high confidence
Test coverage
Added comprehensive test coverage for Rails Performance monitoring features; Added test dummy database schema for delayed\_jobs and users; Added tests for CSV export functionality; Expanded dummy app with Grape API, Sidekiq workers, and performance test endpoints; Updated dummy app configuration for Rails 8 and enhanced test environment settings; Updated dummy app test migrations for Rails 6.0/6.1 compatibility; Updated test dummy app configuration and routes; Updated test dummy app configuration and style settings.
Dependencies
Added Appraisal gemfiles for Rails 7.2, 8.0, and 8.1
New gemfiles have been added to the gemfiles directory to support testing against Rails 7.2, 8.0, and 8.1. These files, generated by Appraisal, define the specific gem dependencies (including Rails, Sidekiq, Grape, Devise, and others) required to run the test suite against each of these major Rails versions, enabling the library to verify compatibility across this expanded matrix of supported frameworks.
gemfiles · high confidence
Rails 8 support and dependency restructuring
The gem now supports Rails 8.0.0, replacing the broad 'rails' dependency with a lighter 'railties' dependency to reduce installation overhead. The dependency on 'engine\_assets' has been replaced with 'isolate\_assets' (\~\> 0.3.0). Development dependencies have been expanded to include tools for testing and integration, such as Sidekiq, Grape, Delayed Job, Puma, and Standardrb, while the Gemfile.lock has been removed from the repository.
(dependencies) · high confidence
Housekeeping
Removal of empty placeholder directory
The empty placeholder file at app/assets/stylesheets/rails\_performance/.keep has been removed, cleaning up unused asset directories.
app/assets/stylesheets · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 58.
Lenses
- Code Health 48
- Architecture 97
- Maturity 67
- Readiness 59
- Security 93
- Accessibility 69
Changes since last survey
- 300 commits — 270 feature/other, 30 fixes
By area
- (repo) — 80 commits
- (root) — 80 commits
- lib/rails_performance — 62 commits
- app/views — 37 commits
- .github/workflows — 14 commits
- app/engine_assets — 6 commits
- test/dummy — 6 commits
- app/controllers — 5 commits
- app/helpers — 2 commits
- lib/generators — 2 commits
- test/rake_ext_test.rb — 2 commits
- .github/dependabot.yml — 1 commit
- docs/custom_data.png — 1 commit
- docs/payload.png — 1 commit
- test/rails_performance_controller_test.rb — 1 commit
Notable commits
- fix: Fix RakeExt test
- fix: Fix chart data handling and potential bug in performance report caching
- fix: Fix missing entries
- fix: Fix resource chart method name and change back index in server charts iteration for better readability of units
- fix: Merge pull request #138 from Studiosity/fix-slow-requests
- fix: Merge pull request #153 from vol1ura/fix-disk-usage-resource-chart-method-name
- fix: Merge pull request #164 from botandrose/fix-standardrb-lints
- fix: Merge pull request #172 from botandrose/fix-summary-charts
- fix: Merge pull request #173 from botandrose/fix-ci
- fix: Merge pull request #174 from botandrose/fix-file-permissions
- fix: Merge pull request #182 from vol1ura/181-fix-charts-window-size-ms
- fix: Merge pull request #30 from haffla/bugfix/rake-task-integration
- fix: Merge pull request #38 from D1ceWard/hotfix/navbar-toggler
- fix: bug fix and new release
- fix: depend only on railties instead of rails fix igorkasyanchuk/rails_performance#60
- fix: fix bug where chart index was being used to determine order-of-magnitude of bytes units. autocalculate best unit choice instead.
- fix: fix ci.
- fix: fix for older ruby
- fix: fix issue with include_all_helpers=false
- fix: fix standard
- …and 280 more
Architecture
- 0 containers · 1 bounded contexts · 0 dependency edges (baseline)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
igorkasyanchuk/rails_performance was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 20 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 632a0d751e1f56145884f63df98e9aaf15131ae1 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-b51f968c9b10.