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 +4 -4
- data/lib/memory_usage_profiler.rb +15 -4
- data/lib/memory_usage_profiler/version.rb +1 -1
- 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: 681cc3cbeb16fcc0f609a774c5b9e6b09a6dffb7
|
4
|
+
data.tar.gz: f8900492691e1b8672975ffe6cc878177b5a98f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61031be922f414567e4062f4b2e451118c0c0f386ce5017078dc4a3b273cb57b00c3cdfc515eeace4194d3d72a82c4f5907d6ada32cdcd198ddb8f47d64f278f
|
7
|
+
data.tar.gz: 9caade465f501e21e726886dff90269101b01c163508ae8f9184ec4eac9eff57c23855677be341954bfecdeb248ddfaaf871fc7f55d5a8cd4ce7d6fc7b3fd081
|
@@ -55,12 +55,23 @@ module MemoryUsageProfiler
|
|
55
55
|
end
|
56
56
|
|
57
57
|
h = {}
|
58
|
-
|
59
|
-
|
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
|
63
|
-
|
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
|
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.
|
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-
|
11
|
+
date: 2013-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|