graphiterb 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.4
1
+ 0.2.5
data/graphiterb.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{graphiterb}
8
- s.version = "0.2.4"
8
+ s.version = "0.2.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Philip (flip) Kromer (@mrflip)"]
@@ -36,7 +36,7 @@ module Graphiterb
36
36
  next unless line =~ /^Mem: *(\d+)k *total, *(\d+)k *used, *(\d+)k *free/
37
37
  total = $1.to_f
38
38
  return [$2, $3].map do |bytes|
39
- bytes.to_f / total rescue 0.0
39
+ 100.0 * (bytes.to_f / total) rescue 0.0
40
40
  end
41
41
  end
42
42
  [0,0]
@@ -47,7 +47,7 @@ module Graphiterb
47
47
  next unless line =~ /^Swap: *(\d+)k *total, *(\d+)k *used, *(\d+)k *free/
48
48
  total = $1.to_f
49
49
  return [$2, $3].map do |bytes|
50
- bytes.to_f / total rescue 0.0
50
+ 100.0 * (bytes.to_f / total) rescue 0.0
51
51
  end
52
52
  end
53
53
  [0,0]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphiterb
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 4
10
- version: 0.2.4
9
+ - 5
10
+ version: 0.2.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Philip (flip) Kromer (@mrflip)