app_profiler 0.1.5 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/app_profiler/middleware/upload_action.rb +1 -1
- data/lib/app_profiler/profile.rb +1 -1
- data/lib/app_profiler/railtie.rb +1 -0
- data/lib/app_profiler/server.rb +3 -1
- data/lib/app_profiler/storage/google_cloud_storage.rb +2 -0
- data/lib/app_profiler/version.rb +1 -1
- data/lib/app_profiler.rb +5 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94eb2e555af032b1b54f392d98d3fa5f6b6fa1cff7aa76fc2092f24b00cdfe9f
|
4
|
+
data.tar.gz: 94e0901199de37232236a09ce66b6adaf61e2a23374c2eed736f603a004e8990
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec60f80896dff0a664faa2d807c09afd154494325a68c6e418e4f9b48765f42b8452f5f6a44253e46e9747513fd80b3835a762fb6a3fdf8cac0ac8086ec3099c
|
7
|
+
data.tar.gz: 4b88a7df76dfaac8d918674675c5dc7a5acae867e7bc4e62ba496aa13952bf02d450a26e1942e394914b98483ff4ebe4afebc7903b04cd669e9485aaac33382c
|
@@ -7,7 +7,7 @@ module AppProfiler
|
|
7
7
|
def call(profile, response: nil, autoredirect: nil, async: false)
|
8
8
|
if async
|
9
9
|
profile.enqueue_upload
|
10
|
-
response[1][AppProfiler.profile_async_header] = true
|
10
|
+
response[1][AppProfiler.profile_async_header] = "true"
|
11
11
|
else
|
12
12
|
profile_upload = profile.upload
|
13
13
|
|
data/lib/app_profiler/profile.rb
CHANGED
data/lib/app_profiler/railtie.rb
CHANGED
@@ -36,6 +36,7 @@ module AppProfiler
|
|
36
36
|
AppProfiler.profile_url_formatter = app.config.app_profiler.profile_url_formatter
|
37
37
|
AppProfiler.upload_queue_max_length = app.config.app_profiler.upload_queue_max_length || 10
|
38
38
|
AppProfiler.upload_queue_interval_secs = app.config.app_profiler.upload_queue_interval_secs || 5
|
39
|
+
AppProfiler.profile_file_prefix = app.config.app_profiler.profile_file_prefix || DefaultProfilePrefix
|
39
40
|
end
|
40
41
|
|
41
42
|
initializer "app_profiler.add_middleware" do |app|
|
data/lib/app_profiler/server.rb
CHANGED
@@ -225,8 +225,10 @@ module AppProfiler
|
|
225
225
|
end
|
226
226
|
|
227
227
|
def stop
|
228
|
-
File.unlink(@socket_file) if File.exist?(@socket_file) && File.socket?(@socket_file)
|
229
228
|
@socket.close
|
229
|
+
File.unlink(@socket_file) if File.exist?(@socket_file) && File.socket?(@socket_file)
|
230
|
+
ObjectSpace.undefine_finalizer(self)
|
231
|
+
nil
|
230
232
|
end
|
231
233
|
|
232
234
|
def abandon
|
data/lib/app_profiler/version.rb
CHANGED
data/lib/app_profiler.rb
CHANGED
@@ -13,6 +13,10 @@ module AppProfiler
|
|
13
13
|
"#{AppProfiler.speedscope_host}#profileURL=#{upload.url}"
|
14
14
|
end
|
15
15
|
|
16
|
+
DefaultProfilePrefix = proc do
|
17
|
+
Time.zone.now.strftime("%Y%m%d-%H%M%S")
|
18
|
+
end
|
19
|
+
|
16
20
|
module Storage
|
17
21
|
autoload :BaseStorage, "app_profiler/storage/base_storage"
|
18
22
|
autoload :FileStorage, "app_profiler/storage/file_storage"
|
@@ -50,6 +54,7 @@ module AppProfiler
|
|
50
54
|
mattr_accessor :server, default: Server
|
51
55
|
mattr_accessor :upload_queue_max_length, default: 10
|
52
56
|
mattr_accessor :upload_queue_interval_secs, default: 5
|
57
|
+
mattr_accessor :profile_file_prefix, default: DefaultProfilePrefix
|
53
58
|
|
54
59
|
class << self
|
55
60
|
def run(*args, &block)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: app_profiler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gannon McGibbon
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2023-
|
16
|
+
date: 2023-10-20 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: activesupport
|
@@ -175,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
175
175
|
- !ruby/object:Gem::Version
|
176
176
|
version: '0'
|
177
177
|
requirements: []
|
178
|
-
rubygems_version: 3.4.
|
178
|
+
rubygems_version: 3.4.21
|
179
179
|
signing_key:
|
180
180
|
specification_version: 4
|
181
181
|
summary: Collect performance profiles for your Rails application.
|