memeasure 0.0.4 → 0.0.6

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: 8c9eaa5e534bd48be9e987fd006745223fafa466
4
- data.tar.gz: 8076a03ff0f6cc4c35eef780eea8d5e1d5928181
3
+ metadata.gz: 25c32df9da66db8b64ba7c792cce135ad078de5b
4
+ data.tar.gz: 95be668fd9fe12ad95289366b0bf43a71336cef7
5
5
  SHA512:
6
- metadata.gz: 90db18147d61de20a0effff0918781b6cd55c0f5f282d335bbd154b91ac7920eee4f2ae472163ec5e97f177d92096dfde1d7856d2dd10cb15f2de380ecd69be7
7
- data.tar.gz: 372949337282c2705107c271a453f499676cefa032a8ddfce037e3283b306ec749f10535b89d35060be192bd777630f0dc268fde7e5486f9e4be4cc843da1f39
6
+ metadata.gz: bda0d9c857db0dd567b8579a36af42e7d7fa4b01040475af526b50f9ff362b25feab07e9d0a071d252ab453db326f2702a25204ebdac8f1dc34a634a50196ec0
7
+ data.tar.gz: e1d477dd16c6ee00d11610fe52b50595d0379a83f9d95fcc7434046a4351e9ea39043a450e75e6296b26ccd2defb46b55e930fd64d2ba48f9b5173a10209fa74
data/README.md CHANGED
@@ -27,7 +27,7 @@ require 'memeasure'
27
27
  class Person
28
28
 
29
29
  def name
30
- Measure.run do
30
+ MeMeasure.run do
31
31
  1000.times { "x" * 1024 * 1024 * 10 }
32
32
  end
33
33
  end
@@ -1,5 +1,7 @@
1
+ require 'benchmark'
2
+ require 'json'
1
3
  require 'memeasure/measure'
2
4
 
3
5
  module MeMeasure
4
- VERSION = '0.0.4'
6
+ VERSION = '0.0.6'
5
7
  end
@@ -11,7 +11,7 @@ module MeMeasure
11
11
  memory_before = `ps -o rss= -p #{Process.pid}`.to_i / 1024
12
12
  gc_stat_before = GC.stat
13
13
 
14
- time = Benchmark.measure do
14
+ time = ::Benchmark.measure do
15
15
  yield
16
16
  end
17
17
 
@@ -24,7 +24,7 @@ module MeMeasure
24
24
  RUBY_VERSION => {
25
25
  gc: options[:gc],
26
26
  time: time.total.round(2),
27
- gc_acount: gc_stat_after[:count].to_i - gc_stat_before[:count].to_i,
27
+ gc_count: gc_stat_after[:count].to_i - gc_stat_before[:count].to_i,
28
28
  memory: "%d MB" % (memory_after - memory_before)
29
29
  }
30
30
  }.to_json)
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: memeasure
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dain Hall
@@ -19,6 +19,7 @@ files:
19
19
  - README.md
20
20
  - lib/memeasure.rb
21
21
  - lib/memeasure/measure.rb
22
+ - memeasure-0.0.4.gem
22
23
  - memeasure.gemspec
23
24
  homepage: http://rubygems.org/gems/memeasure
24
25
  licenses: