allocation_tracer 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d67c74d74d79cd3fac954e0d989e59e40871d215
4
- data.tar.gz: 40ea48ef4e9ad9240b978e7a2ec3fcc62c522342
3
+ metadata.gz: 518e32fe8e403e967e99fb04fd95ff30be8cad53
4
+ data.tar.gz: 46f4d82b5d18f528df3cfaa8200a1b8291b80ce8
5
5
  SHA512:
6
- metadata.gz: c9e6e3a4318f1b875684c096edabd4a3895ce9672209daa069a89b4589ab0146fb5f21dc445515814b4d9fa0f89d1fcefc240722f7e15bdef2c0c5a41eacd2b8
7
- data.tar.gz: 1316fda93a0207643dd47dc3450988fcd6b0c4b571232217b1b4409b09d70766669111ec694d37acf567820146600b287b16037ae5ee255f0005817c9e6c7cf4
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 )
@@ -1,3 +1,3 @@
1
1
  module ObjectSpace::AllocationTracer
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
3
3
  end
@@ -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
- klass ? klass.name : '<internal>',
28
- count, oldcount, total_age / Float(count), min_age, max_age, memsize]
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.0
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-16 00:00:00.000000000 Z
11
+ date: 2015-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler