ruby-memory-usage-profiler 0.0.3 → 0.0.4

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
2
  SHA1:
3
- metadata.gz: 669bcb692f2974ddde29227609039e6888cb2434
4
- data.tar.gz: 6be4688ad02a79a43de58a9c1fef62ebd2968920
3
+ metadata.gz: 681cc3cbeb16fcc0f609a774c5b9e6b09a6dffb7
4
+ data.tar.gz: f8900492691e1b8672975ffe6cc878177b5a98f1
5
5
  SHA512:
6
- metadata.gz: 02285370c47400d461980bdedd36576dbf4defba1ccf223fcbeba7d3ad012a19be01cc4945ef1ccd8ed894f0d15a15ab43a3d7c30bfb9b60c73a69f5635cd11d
7
- data.tar.gz: c8392afc581c4800beefc8cb683c005190053e7bd01d4319f1efba4966bbf99c3694ecddbd1411cbcf3356de7e7b222d2b2c3c6cc40dad87f035da1381cca7bd
6
+ metadata.gz: 61031be922f414567e4062f4b2e451118c0c0f386ce5017078dc4a3b273cb57b00c3cdfc515eeace4194d3d72a82c4f5907d6ada32cdcd198ddb8f47d64f278f
7
+ data.tar.gz: 9caade465f501e21e726886dff90269101b01c163508ae8f9184ec4eac9eff57c23855677be341954bfecdeb248ddfaaf871fc7f55d5a8cd4ce7d6fc7b3fd081
@@ -55,12 +55,23 @@ module MemoryUsageProfiler
55
55
  end
56
56
 
57
57
  h = {}
58
- add ObjectSpace.count_objects(h).keys.map{|e| "count_of_#{e.to_s}"} do |result|
59
- result.concat ObjectSpace.count_objects(h).values
58
+ T_TYPES = %i{
59
+ T_NONE T_OBJECT T_CLASS T_MODULE T_FLOAT T_STRING T_REGEXP T_ARRAY T_HASH T_STRUCT
60
+ T_BIGNUM T_FILE T_DATA T_MATCH T_COMPLEX T_RATIONAL T_NIL T_TRUE T_FALSE T_SYMBOL
61
+ T_FIXNUM T_UNDEF T_NODE T_ICLASS T_ZOMBIE
62
+ }
63
+ add T_TYPES.map{|e| "count_of_#{e.to_s}"} do |result|
64
+ ObjectSpace.count_objects(h)
65
+ T_TYPES.each{|t|
66
+ result << (h[t] || 0)
67
+ }
60
68
  end
61
69
 
62
- add ObjectSpace.count_objects_size(h).keys.map{|e| "size_of_#{e.to_s}"} do |result|
63
- result.concat ObjectSpace.count_objects_size(h).values
70
+ add T_TYPES.map{|e| "size_of_#{e.to_s}"} do |result|
71
+ ObjectSpace.count_objects_size(h)
72
+ T_TYPES.each{|t|
73
+ result << (h[t] || 0)
74
+ }
64
75
  end
65
76
 
66
77
  def self.banner_items
@@ -1,3 +1,3 @@
1
1
  module MemoryUsageProfiler
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-memory-usage-profiler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - TAGOMORI Satoshi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-17 00:00:00.000000000 Z
11
+ date: 2013-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler