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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 44d5eca8d093b0c0830b858dc66cdb3bcbf05fa6
4
- data.tar.gz: cea99af6d10a337743fad39da1d4475bae8c44ea
2
+ SHA256:
3
+ metadata.gz: c1dc3f5aab4a2ed125868d17bf4657933d657f5d9a697813d182cae1ba1b293e
4
+ data.tar.gz: ec484153a1283461143792401a681687c812a0a5698866954fba5b576d87d8c5
5
5
  SHA512:
6
- metadata.gz: d68d970fab0ef478ae8cbcac41adf9998ae8995c6b1824871bd2756b0e9afc78e140319975daeb6b228773e56e4a8cb5f606dc2fcbf0751a7ca5ce7ceee5434b
7
- data.tar.gz: 5d2dda6a5f15bbd10a4fcf5686c5f8760419512d7f0db99026621aa15824727a36a33d0effc53a947255e339f81fedcf32e21386bf25c2b9a6fe77670320bfbb
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
- ![][https://github.com/alisnic/stackprof-webnav/blob/master/screenshots/directory.png?raw=true]
7
+ ![](https://github.com/alisnic/stackprof-webnav/blob/master/screenshots/directory.png?raw=true)
8
8
 
9
- ![][https://github.com/alisnic/stackprof-webnav/blob/master/screenshots/overview.png?raw=true]
9
+ ![](https://github.com/alisnic/stackprof-webnav/blob/master/screenshots/overview.png?raw=true)
10
10
 
11
- ![][https://github.com/alisnic/stackprof-webnav/blob/master/screenshots/callgraph.png?raw=true]
11
+ ![](https://github.com/alisnic/stackprof-webnav/blob/master/screenshots/method.png?raw=true)
12
12
 
13
- ![][https://github.com/alisnic/stackprof-webnav/blob/master/screenshots/flamegraph.png?raw=true]
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
 
@@ -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]
@@ -29,7 +29,7 @@ module StackProf
29
29
 
30
30
  before do
31
31
  unless request.path_info == '/'
32
- if params[:dump] != current_dump.path
32
+ if params[:dump] && params[:dump] != current_dump.path
33
33
  current_dump.path = params[:dump]
34
34
  end
35
35
  end
@@ -1,5 +1,5 @@
1
1
  module StackProf
2
2
  module Webnav
3
- VERSION = '1.0.0'
3
+ VERSION = '1.0.1'
4
4
  end
5
5
  end
@@ -25,7 +25,7 @@
25
25
  %td= caller[:pct]
26
26
  %td
27
27
  %a{:href => url_for("/method", name: caller[:method])}
28
- = caller[:method]
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
- = caller[:method]
45
+ &= caller[:method]
46
46
 
47
47
  %h4 Code
48
48
  != frame[:source]
@@ -36,4 +36,4 @@
36
36
  %td= frame[:samples_pct]
37
37
  %td
38
38
  %a{:href => url_for("/method", name: frame[:method])}
39
- = frame[:method]
39
+ &= frame[:method]
Binary file
Binary file
@@ -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.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: 2019-12-05 00:00:00.000000000 Z
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.14.4
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: