rack-stackprof 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/rack/stackprof.rb +2 -2
- data/lib/rack/stackprof/version.rb +1 -1
- 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: 72608803e68cc106caf43a049cecaf952eb48734aecc1613f4aa653c5f35aa7e
|
4
|
+
data.tar.gz: 2543a6e628cee10009f501b690b7471d8175461ec5dc8ed195493ecabe0177a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bae7093d2c539523e6a05a8eac2903d61c7210b97c7396154557e9c4c6e0f9e2501bffee29ec16440f7a9411e3cb1596ee22edd938dad0f1200a925881a51842
|
7
|
+
data.tar.gz: 42ad0caf1658d01764d51bac80a8cddbfbc78f6e71a97b94ca077e75fd034123c824e346d57b517886278d0cbb274e80deaf6af999d1dcfe419cf1f515d23f47
|
data/Gemfile.lock
CHANGED
data/lib/rack/stackprof.rb
CHANGED
@@ -7,7 +7,7 @@ class Rack::Stackprof
|
|
7
7
|
@profile_interval_seconds = options.fetch(:profile_interval_seconds)
|
8
8
|
@sampling_interval_microseconds = options.fetch(:sampling_interval_microseconds)
|
9
9
|
@last_profiled_at = nil
|
10
|
-
|
10
|
+
@result_directory = options.fetch(:result_directory) # for `StackProf::Middleware.save`
|
11
11
|
end
|
12
12
|
|
13
13
|
def call(env)
|
@@ -36,7 +36,7 @@ class Rack::Stackprof
|
|
36
36
|
StackProf.stop
|
37
37
|
finished_at = Process.clock_gettime(Process::CLOCK_MONOTONIC, :float_microsecond)
|
38
38
|
|
39
|
-
StackProf::Middleware.path = result_filename(env: env, duration_milliseconds: (finished_at - started_at) / 1000)
|
39
|
+
StackProf::Middleware.path = File.join(@result_directory, result_filename(env: env, duration_milliseconds: (finished_at - started_at) / 1000))
|
40
40
|
StackProf::Middleware.save
|
41
41
|
end
|
42
42
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-stackprof
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takashi Kokubun
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: stackprof
|
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
90
|
- !ruby/object:Gem::Version
|
91
91
|
version: '0'
|
92
92
|
requirements: []
|
93
|
-
rubygems_version: 3.
|
93
|
+
rubygems_version: 3.1.2
|
94
94
|
signing_key:
|
95
95
|
specification_version: 4
|
96
96
|
summary: Periodically dump StackProf profile result to tmp directory with easy-to-understand
|