app_profiler 0.1.9 → 0.1.10
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/view_action.rb +2 -2
- data/lib/app_profiler/profile.rb +2 -2
- data/lib/app_profiler/version.rb +1 -1
- data/lib/app_profiler/viewer/base_viewer.rb +3 -3
- data/lib/app_profiler/viewer/speedscope_remote_viewer.rb +10 -4
- data/lib/app_profiler/viewer/speedscope_viewer.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70f971ebae2492140483b90ada2f0d1daf33874803dcc4ea5404877093651974
|
4
|
+
data.tar.gz: df8395bf47f6e378f9322386a17c1934e9b38ac9269ea7ded80a721de7a5c4e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a10f138198666ddc840658e9599c05c40d4d2a14442b0cfa52df8776e00601fda95aaea871138656cdf2a05ae697966e30fbc62c3a1e5351b04987639a63b82
|
7
|
+
data.tar.gz: 2c6af888489015d1bcd827704a7710512455bd2c05d4e3aee596c32063d3b134049d592e5c0012d947e7f1f4731e8a55752303064f866cb535d8fb9ae06b91b9
|
data/lib/app_profiler/profile.rb
CHANGED
data/lib/app_profiler/version.rb
CHANGED
@@ -4,12 +4,12 @@ module AppProfiler
|
|
4
4
|
module Viewer
|
5
5
|
class BaseViewer
|
6
6
|
class << self
|
7
|
-
def view(profile)
|
8
|
-
new(profile).view
|
7
|
+
def view(profile, params = {})
|
8
|
+
new(profile).view(**params)
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
12
|
-
def view(
|
12
|
+
def view(_params = {})
|
13
13
|
raise NotImplementedError
|
14
14
|
end
|
15
15
|
end
|
@@ -7,8 +7,8 @@ module AppProfiler
|
|
7
7
|
module Viewer
|
8
8
|
class SpeedscopeRemoteViewer < BaseViewer
|
9
9
|
class << self
|
10
|
-
def view(profile)
|
11
|
-
new(profile).view
|
10
|
+
def view(profile, params = {})
|
11
|
+
new(profile).view(**params)
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
@@ -17,9 +17,15 @@ module AppProfiler
|
|
17
17
|
@profile = profile
|
18
18
|
end
|
19
19
|
|
20
|
-
def view
|
20
|
+
def view(response: nil, autoredirect: nil, async: false)
|
21
21
|
id = Middleware.id(@profile.file)
|
22
|
-
|
22
|
+
|
23
|
+
if response && response[0].to_i < 500
|
24
|
+
response[1]["Location"] = "/app_profiler/#{id}"
|
25
|
+
response[0] = 303
|
26
|
+
else
|
27
|
+
AppProfiler.logger.info("[Profiler] Profile available at /app_profiler/#{id}\n")
|
28
|
+
end
|
23
29
|
end
|
24
30
|
end
|
25
31
|
end
|
@@ -9,8 +9,8 @@ module AppProfiler
|
|
9
9
|
include Yarn::WithSpeedscope
|
10
10
|
|
11
11
|
class << self
|
12
|
-
def view(profile)
|
13
|
-
new(profile).view
|
12
|
+
def view(profile, params = {})
|
13
|
+
new(profile).view(**params)
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
@@ -19,7 +19,7 @@ module AppProfiler
|
|
19
19
|
@profile = profile
|
20
20
|
end
|
21
21
|
|
22
|
-
def view
|
22
|
+
def view(_params = {})
|
23
23
|
yarn("run", "speedscope", @profile.file.to_s)
|
24
24
|
end
|
25
25
|
end
|
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.10
|
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-12-
|
16
|
+
date: 2023-12-13 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: activesupport
|