allocation_tracer 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -0
- data/lib/allocation_tracer/version.rb +1 -1
- data/lib/rack/allocation_tracer.rb +10 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 518e32fe8e403e967e99fb04fd95ff30be8cad53
|
4
|
+
data.tar.gz: 46f4d82b5d18f528df3cfaa8200a1b8291b80ce8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8df477bc5902d5d027acafdc548cd10dcb1881dcd1235209cd3807f3fa211302cb9beaba56dc10ccf177563957489d7a6554b8e3ec9a4b02901bd7750b9b2fe
|
7
|
+
data.tar.gz: e95cec0e57107c3fa28c64c0a88114d045f1792529b4b9448a8a32b81b37202200ef69885f0f17e7694ff0270f210f7c45e574b5098633a3de9084285559a4e7
|
data/README.md
CHANGED
@@ -238,6 +238,15 @@ You can access the following pages.
|
|
238
238
|
* http://host/allocation_tracer/freed_count_table_page
|
239
239
|
* http://host/allocation_tracer/lifetime_table
|
240
240
|
|
241
|
+
The following pages are demonstration Rails app on Heroku environment.
|
242
|
+
|
243
|
+
* http://protected-journey-7206.herokuapp.com/allocation_tracer/
|
244
|
+
* http://protected-journey-7206.herokuapp.com/allocation_tracer/allocated_count_table
|
245
|
+
* http://protected-journey-7206.herokuapp.com/allocation_tracer/freed_count_table_page
|
246
|
+
* http://protected-journey-7206.herokuapp.com/allocation_tracer/lifetime_table
|
247
|
+
|
248
|
+
Source code of this demo app is https://github.com/ko1/tracer_demo_rails_app. You only need to modify like https://github.com/ko1/tracer_demo_rails_app/blob/master/config.ru to use it on Rails.
|
249
|
+
|
241
250
|
## Contributing
|
242
251
|
|
243
252
|
1. Fork it ( http://github.com/ko1/allocation_tracer/fork )
|
@@ -24,12 +24,18 @@ module Rack
|
|
24
24
|
|
25
25
|
table = result.map{|(file, line, klass), (count, oldcount, total_age, min_age, max_age, memsize)|
|
26
26
|
["#{Rack::Utils.escape_html(file)}:#{'%04d' % line}",
|
27
|
-
|
28
|
-
|
29
|
-
}.sort_by{|vs|
|
30
|
-
ary = @sort_order.map{|i| Numeric === vs[i] ? -vs[i] : vs[i]}
|
27
|
+
klass ? klass.name : '<internal>',
|
28
|
+
count, oldcount, total_age / Float(count), min_age, max_age, memsize].inspect
|
31
29
|
}
|
32
30
|
|
31
|
+
begin
|
32
|
+
table = table.sort_by{|vs|
|
33
|
+
ary = @sort_order.map{|i| Numeric === vs[i] ? -vs[i] : vs[i]}
|
34
|
+
}
|
35
|
+
rescue
|
36
|
+
# ignore sorting error
|
37
|
+
end
|
38
|
+
|
33
39
|
headers = %w(path class count old_count average_age min_age max_age memsize).map.with_index{|e, i|
|
34
40
|
"<th><a href='./?s=#{i}'>#{e}</a></th>"
|
35
41
|
}.join("\n")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: allocation_tracer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Koichi Sasada
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|