stackprof-webnav 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +8 -4
- data/bin/stackprof-webnav +4 -2
- data/lib/stackprof-webnav/server.rb +1 -1
- data/lib/stackprof-webnav/version.rb +1 -1
- data/lib/stackprof-webnav/views/method.haml +2 -2
- data/lib/stackprof-webnav/views/overview.haml +1 -1
- data/screenshots/file.png +0 -0
- data/screenshots/method.png +0 -0
- data/spec/integration_spec.rb +5 -0
- metadata +9 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c1dc3f5aab4a2ed125868d17bf4657933d657f5d9a697813d182cae1ba1b293e
|
4
|
+
data.tar.gz: ec484153a1283461143792401a681687c812a0a5698866954fba5b576d87d8c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a65aaa8975d84e9917af3327c389eb0243060480fbb9f3bf99e017fef3c947f2fd4ac7ccdfba785ac3149ccc7e107cd24bb7a665ca9f40cbc3fc2d9c428df8d5
|
7
|
+
data.tar.gz: b92cfeffddfec601b8f6412e2f3123c298c407bad8a7256d6485f5a97999e934430ea14f0802ad20ff5681042bc50f0c51f5c75c2cfc84daa387de677274c547
|
data/README.md
CHANGED
@@ -4,13 +4,17 @@ Provides a web ui to inspect stackprof dumps.
|
|
4
4
|
|
5
5
|
## Screenshots
|
6
6
|
|
7
|
-
![]
|
7
|
+
![](https://github.com/alisnic/stackprof-webnav/blob/master/screenshots/directory.png?raw=true)
|
8
8
|
|
9
|
-
![]
|
9
|
+
![](https://github.com/alisnic/stackprof-webnav/blob/master/screenshots/overview.png?raw=true)
|
10
10
|
|
11
|
-
![]
|
11
|
+
![](https://github.com/alisnic/stackprof-webnav/blob/master/screenshots/method.png?raw=true)
|
12
12
|
|
13
|
-
![]
|
13
|
+
![](https://github.com/alisnic/stackprof-webnav/blob/master/screenshots/file.png?raw=true)
|
14
|
+
|
15
|
+
![](https://github.com/alisnic/stackprof-webnav/blob/master/screenshots/callgraph.png?raw=true)
|
16
|
+
|
17
|
+
![](https://github.com/alisnic/stackprof-webnav/blob/master/screenshots/flamegraph.png?raw=true)
|
14
18
|
|
15
19
|
## Usage
|
16
20
|
|
data/bin/stackprof-webnav
CHANGED
@@ -4,13 +4,15 @@ require 'stackprof-webnav'
|
|
4
4
|
require 'rack'
|
5
5
|
|
6
6
|
options = {
|
7
|
+
:addr => "127.0.0.1",
|
7
8
|
:port => 9292
|
8
9
|
}
|
9
10
|
|
10
11
|
parser = OptionParser.new(ARGV) do |o|
|
11
|
-
o.banner = "Usage: stackprof-webnav [-f localfile.dump]|[-d directory]|[-p NUMBER]"
|
12
|
+
o.banner = "Usage: stackprof-webnav [-f localfile.dump]|[-d directory]|[-o ADDR]|[-p NUMBER]"
|
12
13
|
o.on('-f [LOCALFILE]', 'Local file path to dump') {|filepath| options[:filepath] = filepath }
|
13
14
|
o.on('-d [DIRECTORY]', 'path to a directory with dumps') {|directory| options[:directory] = directory}
|
15
|
+
o.on('-o [ADDR]', 'Server addr bind') {|addr| options[:addr] = addr }
|
14
16
|
o.on('-p [PORT]', 'Server port') {|port| options[:port] = port }
|
15
17
|
end
|
16
18
|
|
@@ -19,4 +21,4 @@ parser.parse!
|
|
19
21
|
server = StackProf::Webnav::Server
|
20
22
|
server.cmd_options = options
|
21
23
|
|
22
|
-
Rack::Handler.pick(['thin', 'webrick']).run server.new, :Port => options[:port]
|
24
|
+
Rack::Handler.pick(['thin', 'webrick']).run server.new, :Host => options[:addr], :Port => options[:port]
|
@@ -25,7 +25,7 @@
|
|
25
25
|
%td= caller[:pct]
|
26
26
|
%td
|
27
27
|
%a{:href => url_for("/method", name: caller[:method])}
|
28
|
-
|
28
|
+
&= caller[:method]
|
29
29
|
|
30
30
|
- if frame[:callees].any?
|
31
31
|
%table
|
@@ -42,7 +42,7 @@
|
|
42
42
|
%td= caller[:pct]
|
43
43
|
%td
|
44
44
|
%a{:href => url_for("/method", name: caller[:method])}
|
45
|
-
|
45
|
+
&= caller[:method]
|
46
46
|
|
47
47
|
%h4 Code
|
48
48
|
!= frame[:source]
|
Binary file
|
Binary file
|
data/spec/integration_spec.rb
CHANGED
@@ -26,6 +26,11 @@ RSpec.describe "integration tests" do
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
+
it "does not crash on unknown requests" do
|
30
|
+
app.get "/favicon.ico"
|
31
|
+
expect(response.status).to eq(404)
|
32
|
+
end
|
33
|
+
|
29
34
|
describe "overview" do
|
30
35
|
it "works with a valid dump" do
|
31
36
|
app.get "/overview", dump: fixture_path("test.dump")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stackprof-webnav
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrei Lisnic
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|
@@ -188,7 +188,9 @@ files:
|
|
188
188
|
- lib/stackprof-webnav/views/overview.haml
|
189
189
|
- screenshots/callgraph.png
|
190
190
|
- screenshots/directory.png
|
191
|
+
- screenshots/file.png
|
191
192
|
- screenshots/flamegraph.png
|
193
|
+
- screenshots/method.png
|
192
194
|
- screenshots/overview.png
|
193
195
|
- spec/fixtures/test-raw.dump
|
194
196
|
- spec/fixtures/test.dump
|
@@ -200,7 +202,7 @@ homepage: https://github.com/alisnic/stackprof-webnav
|
|
200
202
|
licenses:
|
201
203
|
- MIT
|
202
204
|
metadata: {}
|
203
|
-
post_install_message:
|
205
|
+
post_install_message:
|
204
206
|
rdoc_options: []
|
205
207
|
require_paths:
|
206
208
|
- lib
|
@@ -215,9 +217,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
215
217
|
- !ruby/object:Gem::Version
|
216
218
|
version: '0'
|
217
219
|
requirements: []
|
218
|
-
rubyforge_project:
|
219
|
-
rubygems_version: 2.6.
|
220
|
-
signing_key:
|
220
|
+
rubyforge_project:
|
221
|
+
rubygems_version: 2.7.6.2
|
222
|
+
signing_key:
|
221
223
|
specification_version: 4
|
222
224
|
summary: View stackprof dumps in a web UI
|
223
225
|
test_files:
|