rails_pulse 0.2.4 → 0.2.5.pre.pre.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +269 -12
- data/Rakefile +142 -8
- data/app/assets/stylesheets/rails_pulse/components/table.css +16 -1
- data/app/assets/stylesheets/rails_pulse/components/tags.css +7 -2
- data/app/assets/stylesheets/rails_pulse/components/utilities.css +3 -0
- data/app/controllers/concerns/chart_table_concern.rb +2 -1
- data/app/controllers/rails_pulse/application_controller.rb +11 -1
- data/app/controllers/rails_pulse/assets_controller.rb +18 -2
- data/app/controllers/rails_pulse/job_runs_controller.rb +37 -0
- data/app/controllers/rails_pulse/jobs_controller.rb +80 -0
- data/app/controllers/rails_pulse/operations_controller.rb +43 -31
- data/app/controllers/rails_pulse/queries_controller.rb +1 -1
- data/app/controllers/rails_pulse/requests_controller.rb +3 -9
- data/app/controllers/rails_pulse/routes_controller.rb +1 -1
- data/app/controllers/rails_pulse/tags_controller.rb +31 -5
- data/app/helpers/rails_pulse/application_helper.rb +32 -1
- data/app/helpers/rails_pulse/breadcrumbs_helper.rb +15 -1
- data/app/helpers/rails_pulse/status_helper.rb +16 -0
- data/app/helpers/rails_pulse/tags_helper.rb +39 -1
- data/app/javascript/rails_pulse/controllers/chart_controller.js +112 -8
- data/app/models/concerns/rails_pulse/taggable.rb +25 -2
- data/app/models/rails_pulse/charts/operations_chart.rb +33 -0
- data/app/models/rails_pulse/dashboard/charts/p95_response_time.rb +1 -2
- data/app/models/rails_pulse/dashboard/tables/slow_routes.rb +1 -1
- data/app/models/rails_pulse/job.rb +85 -0
- data/app/models/rails_pulse/job_run.rb +76 -0
- data/app/models/rails_pulse/jobs/cards/average_duration.rb +85 -0
- data/app/models/rails_pulse/jobs/cards/base.rb +70 -0
- data/app/models/rails_pulse/jobs/cards/failure_rate.rb +85 -0
- data/app/models/rails_pulse/jobs/cards/total_jobs.rb +74 -0
- data/app/models/rails_pulse/jobs/cards/total_runs.rb +48 -0
- data/app/models/rails_pulse/operation.rb +16 -3
- data/app/models/rails_pulse/queries/cards/average_query_times.rb +3 -3
- data/app/models/rails_pulse/queries/cards/execution_rate.rb +1 -1
- data/app/models/rails_pulse/queries/cards/percentile_query_times.rb +1 -1
- data/app/models/rails_pulse/queries/tables/index.rb +2 -1
- data/app/models/rails_pulse/query.rb +10 -1
- data/app/models/rails_pulse/routes/cards/average_response_times.rb +3 -2
- data/app/models/rails_pulse/routes/cards/error_rate_per_route.rb +1 -1
- data/app/models/rails_pulse/routes/cards/percentile_response_times.rb +1 -1
- data/app/models/rails_pulse/routes/cards/request_count_totals.rb +1 -1
- data/app/models/rails_pulse/routes/tables/index.rb +2 -1
- data/app/models/rails_pulse/summary.rb +10 -3
- data/app/services/rails_pulse/summary_service.rb +46 -0
- data/app/views/layouts/rails_pulse/_menu_items.html.erb +7 -0
- data/app/views/layouts/rails_pulse/application.html.erb +23 -0
- data/app/views/rails_pulse/components/_active_filters.html.erb +7 -6
- data/app/views/rails_pulse/components/_page_header.html.erb +8 -7
- data/app/views/rails_pulse/components/_table.html.erb +7 -4
- data/app/views/rails_pulse/dashboard/index.html.erb +1 -1
- data/app/views/rails_pulse/job_runs/_operations.html.erb +78 -0
- data/app/views/rails_pulse/job_runs/index.html.erb +3 -0
- data/app/views/rails_pulse/job_runs/show.html.erb +51 -0
- data/app/views/rails_pulse/jobs/_job_runs_table.html.erb +35 -0
- data/app/views/rails_pulse/jobs/_table.html.erb +43 -0
- data/app/views/rails_pulse/jobs/index.html.erb +34 -0
- data/app/views/rails_pulse/jobs/show.html.erb +49 -0
- data/app/views/rails_pulse/operations/_operation_analysis_application.html.erb +29 -27
- data/app/views/rails_pulse/operations/_operation_analysis_view.html.erb +11 -9
- data/app/views/rails_pulse/operations/show.html.erb +10 -8
- data/app/views/rails_pulse/queries/_table.html.erb +3 -3
- data/app/views/rails_pulse/requests/_table.html.erb +6 -6
- data/app/views/rails_pulse/routes/_table.html.erb +3 -3
- data/app/views/rails_pulse/routes/show.html.erb +1 -1
- data/app/views/rails_pulse/tags/_tag_manager.html.erb +7 -14
- data/config/brakeman.ignore +213 -0
- data/config/brakeman.yml +68 -0
- data/config/initializers/rails_pulse.rb +52 -0
- data/config/routes.rb +6 -0
- data/db/rails_pulse_migrate/20250113000000_add_jobs_to_rails_pulse.rb +95 -0
- data/db/rails_pulse_migrate/20250122000000_add_query_fingerprinting.rb +150 -0
- data/db/rails_pulse_migrate/20250202000000_add_index_to_request_uuid.rb +14 -0
- data/db/rails_pulse_schema.rb +186 -103
- data/lib/generators/rails_pulse/templates/db/rails_pulse_schema.rb +186 -103
- data/lib/generators/rails_pulse/templates/migrations/install_rails_pulse_tables.rb +30 -1
- data/lib/generators/rails_pulse/templates/rails_pulse.rb +31 -0
- data/lib/rails_pulse/active_job_extensions.rb +13 -0
- data/lib/rails_pulse/adapters/delayed_job_plugin.rb +25 -0
- data/lib/rails_pulse/adapters/sidekiq_middleware.rb +41 -0
- data/lib/rails_pulse/cleanup_service.rb +65 -0
- data/lib/rails_pulse/configuration.rb +80 -7
- data/lib/rails_pulse/engine.rb +34 -3
- data/lib/rails_pulse/extensions/active_record.rb +82 -0
- data/lib/rails_pulse/job_run_collector.rb +172 -0
- data/lib/rails_pulse/middleware/request_collector.rb +20 -43
- data/lib/rails_pulse/subscribers/operation_subscriber.rb +11 -5
- data/lib/rails_pulse/tracker.rb +82 -0
- data/lib/rails_pulse/version.rb +1 -1
- data/lib/rails_pulse.rb +2 -0
- data/lib/rails_pulse_server.ru +107 -0
- data/lib/tasks/rails_pulse_benchmark.rake +382 -0
- data/public/rails-pulse-assets/rails-pulse-icons.js +3 -2
- data/public/rails-pulse-assets/rails-pulse-icons.js.map +1 -1
- data/public/rails-pulse-assets/rails-pulse.css +1 -1
- data/public/rails-pulse-assets/rails-pulse.css.map +1 -1
- data/public/rails-pulse-assets/rails-pulse.js +1 -1
- data/public/rails-pulse-assets/rails-pulse.js.map +3 -3
- metadata +37 -9
- data/app/models/rails_pulse/requests/charts/operations_chart.rb +0 -35
- data/db/migrate/20250930105043_install_rails_pulse_tables.rb +0 -23
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails_pulse
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.5.pre.pre.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rails Pulse
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2025-
|
|
10
|
+
date: 2025-12-18 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: rails
|
|
@@ -112,33 +112,33 @@ dependencies:
|
|
|
112
112
|
- !ruby/object:Gem::Version
|
|
113
113
|
version: '44'
|
|
114
114
|
- !ruby/object:Gem::Dependency
|
|
115
|
-
name:
|
|
115
|
+
name: async
|
|
116
116
|
requirement: !ruby/object:Gem::Requirement
|
|
117
117
|
requirements:
|
|
118
118
|
- - "~>"
|
|
119
119
|
- !ruby/object:Gem::Version
|
|
120
|
-
version: '
|
|
120
|
+
version: '2.0'
|
|
121
121
|
type: :runtime
|
|
122
122
|
prerelease: false
|
|
123
123
|
version_requirements: !ruby/object:Gem::Requirement
|
|
124
124
|
requirements:
|
|
125
125
|
- - "~>"
|
|
126
126
|
- !ruby/object:Gem::Version
|
|
127
|
-
version: '
|
|
127
|
+
version: '2.0'
|
|
128
128
|
- !ruby/object:Gem::Dependency
|
|
129
129
|
name: rails-controller-testing
|
|
130
130
|
requirement: !ruby/object:Gem::Requirement
|
|
131
131
|
requirements:
|
|
132
132
|
- - ">="
|
|
133
133
|
- !ruby/object:Gem::Version
|
|
134
|
-
version: '0'
|
|
134
|
+
version: '1.0'
|
|
135
135
|
type: :development
|
|
136
136
|
prerelease: false
|
|
137
137
|
version_requirements: !ruby/object:Gem::Requirement
|
|
138
138
|
requirements:
|
|
139
139
|
- - ">="
|
|
140
140
|
- !ruby/object:Gem::Version
|
|
141
|
-
version: '0'
|
|
141
|
+
version: '1.0'
|
|
142
142
|
description: Ruby on Rails performance monitoring tool that provides insights into
|
|
143
143
|
your application's performance, helping you identify bottlenecks and optimize your
|
|
144
144
|
code for better efficiency.
|
|
@@ -190,6 +190,8 @@ files:
|
|
|
190
190
|
- app/controllers/rails_pulse/assets_controller.rb
|
|
191
191
|
- app/controllers/rails_pulse/csp_test_controller.rb
|
|
192
192
|
- app/controllers/rails_pulse/dashboard_controller.rb
|
|
193
|
+
- app/controllers/rails_pulse/job_runs_controller.rb
|
|
194
|
+
- app/controllers/rails_pulse/jobs_controller.rb
|
|
193
195
|
- app/controllers/rails_pulse/operations_controller.rb
|
|
194
196
|
- app/controllers/rails_pulse/queries_controller.rb
|
|
195
197
|
- app/controllers/rails_pulse/requests_controller.rb
|
|
@@ -230,10 +232,18 @@ files:
|
|
|
230
232
|
- app/mailers/rails_pulse/application_mailer.rb
|
|
231
233
|
- app/models/concerns/rails_pulse/taggable.rb
|
|
232
234
|
- app/models/rails_pulse/application_record.rb
|
|
235
|
+
- app/models/rails_pulse/charts/operations_chart.rb
|
|
233
236
|
- app/models/rails_pulse/dashboard/charts/average_response_time.rb
|
|
234
237
|
- app/models/rails_pulse/dashboard/charts/p95_response_time.rb
|
|
235
238
|
- app/models/rails_pulse/dashboard/tables/slow_queries.rb
|
|
236
239
|
- app/models/rails_pulse/dashboard/tables/slow_routes.rb
|
|
240
|
+
- app/models/rails_pulse/job.rb
|
|
241
|
+
- app/models/rails_pulse/job_run.rb
|
|
242
|
+
- app/models/rails_pulse/jobs/cards/average_duration.rb
|
|
243
|
+
- app/models/rails_pulse/jobs/cards/base.rb
|
|
244
|
+
- app/models/rails_pulse/jobs/cards/failure_rate.rb
|
|
245
|
+
- app/models/rails_pulse/jobs/cards/total_jobs.rb
|
|
246
|
+
- app/models/rails_pulse/jobs/cards/total_runs.rb
|
|
237
247
|
- app/models/rails_pulse/operation.rb
|
|
238
248
|
- app/models/rails_pulse/queries/cards/average_query_times.rb
|
|
239
249
|
- app/models/rails_pulse/queries/cards/execution_rate.rb
|
|
@@ -243,7 +253,6 @@ files:
|
|
|
243
253
|
- app/models/rails_pulse/query.rb
|
|
244
254
|
- app/models/rails_pulse/request.rb
|
|
245
255
|
- app/models/rails_pulse/requests/charts/average_response_times.rb
|
|
246
|
-
- app/models/rails_pulse/requests/charts/operations_chart.rb
|
|
247
256
|
- app/models/rails_pulse/requests/tables/index.rb
|
|
248
257
|
- app/models/rails_pulse/route.rb
|
|
249
258
|
- app/models/rails_pulse/routes/cards/average_response_times.rb
|
|
@@ -285,6 +294,13 @@ files:
|
|
|
285
294
|
- app/views/rails_pulse/dashboard/index.html.erb
|
|
286
295
|
- app/views/rails_pulse/dashboard/tables/_routes_table.html.erb
|
|
287
296
|
- app/views/rails_pulse/dashboard/tables/_standard_table.html.erb
|
|
297
|
+
- app/views/rails_pulse/job_runs/_operations.html.erb
|
|
298
|
+
- app/views/rails_pulse/job_runs/index.html.erb
|
|
299
|
+
- app/views/rails_pulse/job_runs/show.html.erb
|
|
300
|
+
- app/views/rails_pulse/jobs/_job_runs_table.html.erb
|
|
301
|
+
- app/views/rails_pulse/jobs/_table.html.erb
|
|
302
|
+
- app/views/rails_pulse/jobs/index.html.erb
|
|
303
|
+
- app/views/rails_pulse/jobs/show.html.erb
|
|
288
304
|
- app/views/rails_pulse/operations/_operation_analysis_application.html.erb
|
|
289
305
|
- app/views/rails_pulse/operations/_operation_analysis_database.html.erb
|
|
290
306
|
- app/views/rails_pulse/operations/_operation_analysis_generic.html.erb
|
|
@@ -312,10 +328,14 @@ files:
|
|
|
312
328
|
- app/views/rails_pulse/skeletons/_panel.html.erb
|
|
313
329
|
- app/views/rails_pulse/skeletons/_table.html.erb
|
|
314
330
|
- app/views/rails_pulse/tags/_tag_manager.html.erb
|
|
331
|
+
- config/brakeman.ignore
|
|
332
|
+
- config/brakeman.yml
|
|
315
333
|
- config/importmap.rb
|
|
316
334
|
- config/initializers/rails_pulse.rb
|
|
317
335
|
- config/routes.rb
|
|
318
|
-
- db/
|
|
336
|
+
- db/rails_pulse_migrate/20250113000000_add_jobs_to_rails_pulse.rb
|
|
337
|
+
- db/rails_pulse_migrate/20250122000000_add_query_fingerprinting.rb
|
|
338
|
+
- db/rails_pulse_migrate/20250202000000_add_index_to_request_uuid.rb
|
|
319
339
|
- db/rails_pulse_schema.rb
|
|
320
340
|
- lib/generators/rails_pulse/convert_to_migrations_generator.rb
|
|
321
341
|
- lib/generators/rails_pulse/install_generator.rb
|
|
@@ -325,14 +345,22 @@ files:
|
|
|
325
345
|
- lib/generators/rails_pulse/templates/rails_pulse.rb
|
|
326
346
|
- lib/generators/rails_pulse/upgrade_generator.rb
|
|
327
347
|
- lib/rails_pulse.rb
|
|
348
|
+
- lib/rails_pulse/active_job_extensions.rb
|
|
349
|
+
- lib/rails_pulse/adapters/delayed_job_plugin.rb
|
|
350
|
+
- lib/rails_pulse/adapters/sidekiq_middleware.rb
|
|
328
351
|
- lib/rails_pulse/cleanup_service.rb
|
|
329
352
|
- lib/rails_pulse/configuration.rb
|
|
330
353
|
- lib/rails_pulse/engine.rb
|
|
354
|
+
- lib/rails_pulse/extensions/active_record.rb
|
|
355
|
+
- lib/rails_pulse/job_run_collector.rb
|
|
331
356
|
- lib/rails_pulse/middleware/asset_server.rb
|
|
332
357
|
- lib/rails_pulse/middleware/request_collector.rb
|
|
333
358
|
- lib/rails_pulse/subscribers/operation_subscriber.rb
|
|
359
|
+
- lib/rails_pulse/tracker.rb
|
|
334
360
|
- lib/rails_pulse/version.rb
|
|
361
|
+
- lib/rails_pulse_server.ru
|
|
335
362
|
- lib/tasks/rails_pulse.rake
|
|
363
|
+
- lib/tasks/rails_pulse_benchmark.rake
|
|
336
364
|
- lib/tasks/rails_pulse_tasks.rake
|
|
337
365
|
- public/rails-pulse-assets/csp-test.js
|
|
338
366
|
- public/rails-pulse-assets/rails-pulse-icons.js
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
module RailsPulse
|
|
2
|
-
module Requests
|
|
3
|
-
module Charts
|
|
4
|
-
class OperationsChart
|
|
5
|
-
OperationBar = Struct.new(:operation, :duration, :left_pct, :width_pct)
|
|
6
|
-
|
|
7
|
-
attr_reader :bars, :min_start, :max_end, :total_duration
|
|
8
|
-
|
|
9
|
-
HORIZONTAL_OFFSET_PX = 20
|
|
10
|
-
|
|
11
|
-
def initialize(operations)
|
|
12
|
-
@operations = operations
|
|
13
|
-
@min_start = @operations.map(&:start_time).min || 0
|
|
14
|
-
@max_end = @operations.map { |op| op.start_time + op.duration }.max || 1
|
|
15
|
-
@total_duration = (@max_end - @min_start).nonzero? || 1
|
|
16
|
-
@bars = build_bars
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
private
|
|
20
|
-
|
|
21
|
-
def build_bars
|
|
22
|
-
@operations.map do |operation|
|
|
23
|
-
left_pct = ((operation.start_time - @min_start).to_f / @total_duration) * (100 - px_to_pct) + px_to_pct / 2
|
|
24
|
-
width_pct = (operation.duration.to_f / @total_duration) * (100 - px_to_pct)
|
|
25
|
-
OperationBar.new(operation, operation.duration.round(0), left_pct, width_pct)
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
def px_to_pct
|
|
30
|
-
(HORIZONTAL_OFFSET_PX.to_f / 1000) * 100
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
end
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# Generated from Rails Pulse schema - automatically loads current schema definition
|
|
2
|
-
class InstallRailsPulseTables < ActiveRecord::Migration["#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}".to_f]
|
|
3
|
-
def change
|
|
4
|
-
# Load and execute the Rails Pulse schema directly
|
|
5
|
-
# This ensures the migration is always in sync with the schema file
|
|
6
|
-
schema_file = File.join(File.dirname(__FILE__), "..", "rails_pulse_schema.rb")
|
|
7
|
-
|
|
8
|
-
if File.exist?(schema_file)
|
|
9
|
-
say "Loading Rails Pulse schema from db/rails_pulse_schema.rb"
|
|
10
|
-
|
|
11
|
-
# Load the schema file to define RailsPulse::Schema
|
|
12
|
-
load schema_file
|
|
13
|
-
|
|
14
|
-
# Execute the schema in the context of this migration
|
|
15
|
-
RailsPulse::Schema.call(connection)
|
|
16
|
-
|
|
17
|
-
say "Rails Pulse tables created successfully"
|
|
18
|
-
say "The schema file db/rails_pulse_schema.rb remains as your single source of truth"
|
|
19
|
-
else
|
|
20
|
-
raise "Rails Pulse schema file not found at db/rails_pulse_schema.rb"
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
end
|