rails_performance 0.9.8 → 0.9.9
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 +2 -2
- data/lib/rails_performance/engine.rb +19 -16
- data/lib/rails_performance/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6efdeeeb71789d08c284f21165138c13bdcb094cd0d48fcbaad521a946fec6f
|
4
|
+
data.tar.gz: 81b265d6bf3555fb2868504983ec3b01cf1efe9d99b4b4e74b08533d08ff2023
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f59e689a2b57a486b857cc910fccdf84fdc2a7afeee08f691a912aa3affcea5138f1be4f693699c06d9ac0c126c07f4b479e1434242d427581a413818d13fc7
|
7
|
+
data.tar.gz: 591b8b1334668e285fb8a23fdf01498e90b0f5d172378cce8abfd67af2d81f31046ee7520b1d1aad6c125cc61f13ef83f86dd6f2591eeb0fb1a2f89697518349
|
data/README.md
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
[](https://github.com/igorkasyanchuk/rails_performance/actions/workflows/ruby.yml)
|
4
4
|
[](https://www.railsjazz.com)
|
5
|
+
[](https://www.patreon.com/igorkasyanchuk)
|
5
6
|
|
6
7
|
A self-hosted tool to monitor the performance of your Ruby on Rails application.
|
7
8
|
|
@@ -135,9 +136,8 @@ The idea of this gem grew from curriosity how many RPM my app receiving per day.
|
|
135
136
|
|
136
137
|
## TODO
|
137
138
|
|
138
|
-
- documentation in Readme
|
139
|
+
- documentation in Readme?
|
139
140
|
- capture stacktrace of 500 errors and show in side panel
|
140
|
-
- CI for tests
|
141
141
|
- time/zone config?
|
142
142
|
- connected charts on dashboard, when zoom, when hover?
|
143
143
|
- ability to zoom to see requests withing specific datetime range
|
@@ -7,27 +7,16 @@ module RailsPerformance
|
|
7
7
|
class Engine < ::Rails::Engine
|
8
8
|
isolate_namespace RailsPerformance
|
9
9
|
|
10
|
-
|
10
|
+
initializer "rails_performance.middleware" do |app|
|
11
|
+
next unless RailsPerformance.enabled
|
11
12
|
|
12
13
|
if ::Rails::VERSION::MAJOR.to_i >= 5
|
13
|
-
|
14
|
+
app.middleware.insert_after ActionDispatch::Executor, RailsPerformance::Rails::Middleware
|
14
15
|
else
|
15
|
-
|
16
|
+
app.middleware.insert_after ActionDispatch::Static, RailsPerformance::Rails::Middleware
|
16
17
|
end
|
17
18
|
|
18
|
-
|
19
|
-
ActiveSupport::Notifications.subscribe(
|
20
|
-
"process_action.action_controller",
|
21
|
-
RailsPerformance::Instrument::MetricsCollector.new
|
22
|
-
)
|
23
|
-
|
24
|
-
config.after_initialize do |app|
|
25
|
-
ActionView::LogSubscriber.send :prepend, RailsPerformance::Extensions::View
|
26
|
-
ActiveRecord::LogSubscriber.send :prepend, RailsPerformance::Extensions::Db
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
if const_defined?("Sidekiq")
|
19
|
+
if defined?(Sidekiq)
|
31
20
|
require_relative './gems/sidekiq.rb'
|
32
21
|
Sidekiq.configure_server do |config|
|
33
22
|
config.server_middleware do |chain|
|
@@ -35,8 +24,22 @@ module RailsPerformance
|
|
35
24
|
end
|
36
25
|
end
|
37
26
|
end
|
27
|
+
end
|
28
|
+
|
29
|
+
initializer :configure_metrics, after: :initialize_logger do
|
30
|
+
next unless RailsPerformance.enabled
|
38
31
|
|
32
|
+
ActiveSupport::Notifications.subscribe(
|
33
|
+
"process_action.action_controller",
|
34
|
+
RailsPerformance::Instrument::MetricsCollector.new
|
35
|
+
)
|
39
36
|
end
|
40
37
|
|
38
|
+
config.after_initialize do
|
39
|
+
next unless RailsPerformance.enabled
|
40
|
+
|
41
|
+
ActionView::LogSubscriber.send :prepend, RailsPerformance::Extensions::View
|
42
|
+
ActiveRecord::LogSubscriber.send :prepend, RailsPerformance::Extensions::Db
|
43
|
+
end
|
41
44
|
end
|
42
45
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_performance
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Kasyanchuk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: mimemagic
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
97
111
|
description: 3rd party dependency-free solution how to monitor performance of your
|
98
112
|
Rails applications.
|
99
113
|
email:
|