leaks 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,18 +1,18 @@
1
1
  module Leaks
2
2
  class RAMUsage
3
3
  def initialize
4
- @previous = kilobytes_used
5
- @current = @previous
4
+ @current = kilobytes_used
5
+ @highest = @current
6
6
  @stable = Time.now
7
7
  @increased = false
8
8
  end
9
9
 
10
10
  def update
11
11
  @increased = false
12
- @previous = @current
13
12
  @current = kilobytes_used
14
13
 
15
- if @current > @previous
14
+ if @current > @highest
15
+ @highest = @current
16
16
  @increased = true
17
17
  @stable = Time.now
18
18
  end
@@ -27,7 +27,7 @@ module Leaks
27
27
  end
28
28
 
29
29
  def to_s
30
- "Usage: #{current}KB"
30
+ "Current: #{current}KB Highest: #{@highest}KB"
31
31
  end
32
32
 
33
33
  def stable_for
data/lib/leaks/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Leaks
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leaks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: