ruby-memory-usage-profiler 0.0.2 → 0.0.3
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 -1
- 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: 669bcb692f2974ddde29227609039e6888cb2434
|
4
|
+
data.tar.gz: 6be4688ad02a79a43de58a9c1fef62ebd2968920
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02285370c47400d461980bdedd36576dbf4defba1ccf223fcbeba7d3ad012a19be01cc4945ef1ccd8ed894f0d15a15ab43a3d7c30bfb9b60c73a69f5635cd11d
|
7
|
+
data.tar.gz: c8392afc581c4800beefc8cb683c005190053e7bd01d4319f1efba4966bbf99c3694ecddbd1411cbcf3356de7e7b222d2b2c3c6cc40dad87f035da1381cca7bd
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
require_relative 'memory_usage_profiler/version'
|
2
2
|
|
3
3
|
require 'objspace'
|
4
4
|
|
@@ -54,6 +54,15 @@ module MemoryUsageProfiler
|
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
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
|
60
|
+
end
|
61
|
+
|
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
|
64
|
+
end
|
65
|
+
|
57
66
|
def self.banner_items
|
58
67
|
MEMORY_PROFILE_BANNER
|
59
68
|
end
|
@@ -99,3 +108,8 @@ module MemoryUsageProfiler
|
|
99
108
|
@@thread_running = false
|
100
109
|
end
|
101
110
|
end
|
111
|
+
|
112
|
+
if $0 == __FILE__
|
113
|
+
MemoryUsageProfiler.start_thread(1, '-')
|
114
|
+
100_000_000.times{''}
|
115
|
+
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.
|
4
|
+
version: 0.0.3
|
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-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|