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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5390adb52d3669790abd8abb7d340cc71491392a
4
- data.tar.gz: 7aa86467294d964adbf18fb20c1f688a24231e6c
3
+ metadata.gz: 669bcb692f2974ddde29227609039e6888cb2434
4
+ data.tar.gz: 6be4688ad02a79a43de58a9c1fef62ebd2968920
5
5
  SHA512:
6
- metadata.gz: 1e8cf7fa38fe281378eaf9e8d964845fd20f3cccb3706924f19a371ae9bd0cf22aade1bb190dc8996e81c7cf185c43ddcbc5bb29862e9b98efc5359a747e9533
7
- data.tar.gz: 56f7a141f507c575ff4e9284440394f101aefcdb3ae7f4a1434996723f9fee95f857efa11e06812e7b88aa36672e9c814f3aef46668a87280f5dadd51242b52a
6
+ metadata.gz: 02285370c47400d461980bdedd36576dbf4defba1ccf223fcbeba7d3ad012a19be01cc4945ef1ccd8ed894f0d15a15ab43a3d7c30bfb9b60c73a69f5635cd11d
7
+ data.tar.gz: c8392afc581c4800beefc8cb683c005190053e7bd01d4319f1efba4966bbf99c3694ecddbd1411cbcf3356de7e7b222d2b2c3c6cc40dad87f035da1381cca7bd
@@ -1,4 +1,4 @@
1
- require 'memory_usage_profiler/version'
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
@@ -1,3 +1,3 @@
1
1
  module MemoryUsageProfiler
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
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.2
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-04 00:00:00.000000000 Z
11
+ date: 2013-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler