linux-kstat 0.2.1-universal-linux → 0.2.2-universal-linux

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fe0848dc172476fb11e7a128b29b427d098d8cf7e734fe59554508c6c2ebdc8e
4
- data.tar.gz: 64f5d81c6e4e09cfbc5f79125ac5dc826054d3683e070e473cad19a49f17b73d
3
+ metadata.gz: 530e0d88b03c26ac74b45bd918cdeadf8fb6c2daa13e83a5f1e12029217298e9
4
+ data.tar.gz: 4f882bbd1933d6f0bf1edb860c19dad5fb01d1f446824485508ab603ec30a5f0
5
5
  SHA512:
6
- metadata.gz: 3c3bda072076e73eb22b90f74e30f53127c7babcb3d8e1387c2d70746335ef8941ab8f92c3dc86321b29ab486550d7acc995b8a5b1ca52cef68d2856cc66ba96
7
- data.tar.gz: 19c855105cd55dd0a0423f74386fcce79cc382d4ca6a7a93144698119388bf6ccf233abf2813476148e3f0e00365838a3187b8e1aece366fdf3771d209d6ee66
6
+ metadata.gz: 13983746b47e2cdbb65abae12030d064cf0ef73062bbe861060a426a313aa8e3f07468126353ba77e93b5f9cb6dfd4985efbda140f3a2482c29905d303f93674
7
+ data.tar.gz: 00f4ee4e8719b1f443e989afc1ff3cfe9a679edd70cde22a1979776c2f15128ffe8cec7077e11d25d10ec9a131c2296c7383dc1ab3b32ff0a54859b2e0f68357
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/CHANGES CHANGED
@@ -1,3 +1,6 @@
1
+ = 0.2.2 - 5-Mar-2019
2
+ * Added the steal, guest and guest_nice attributes for cpu stats.
3
+
1
4
  = 0.2.1 - 25-Jan-2019
2
5
  * Fixed license name (missing hyphen).
3
6
  * Added metadata to the gemspec.
data/lib/linux/kstat.rb CHANGED
@@ -7,7 +7,7 @@ module Linux
7
7
  extend Forwardable
8
8
 
9
9
  # The version of the linux-kstat library
10
- VERSION = '0.2.1'.freeze
10
+ VERSION = '0.2.2'.freeze
11
11
 
12
12
  # :stopdoc:
13
13
 
@@ -26,13 +26,16 @@ module Linux
26
26
  # kstat = Linux::Kstat.new
27
27
  #
28
28
  # kstat[:cpu] => {
29
- # :idle => 250713454,
30
- # :iowait => 2745691,
31
- # :irq => 39717,
32
- # :softirq => 31323,
33
- # :system => 1881655,
34
- # :nice => 117158,
35
- # :user => 7137418
29
+ # :idle => 250713454,
30
+ # :iowait => 2745691,
31
+ # :irq => 39717,
32
+ # :softirq => 31323,
33
+ # :system => 1881655,
34
+ # :nice => 117158,
35
+ # :user => 7137418,
36
+ # :steal => 0,
37
+ # :guest => 1162987977,
38
+ # :guest_nice => 0
36
39
  # }
37
40
  #
38
41
  # kstat[:processes] # => 1299560
@@ -54,13 +57,16 @@ module Linux
54
57
  unless info.empty?
55
58
  if info.first =~ /^cpu/i
56
59
  hash[info.first.to_sym] = {
57
- :user => info[1].to_i,
58
- :nice => info[2].to_i,
59
- :system => info[3].to_i,
60
- :idle => info[4].to_i,
61
- :iowait => info[5].to_i,
62
- :irq => info[6].to_i,
63
- :softirq => info[7].to_i
60
+ :user => info[1].to_i,
61
+ :nice => info[2].to_i,
62
+ :system => info[3].to_i,
63
+ :idle => info[4].to_i,
64
+ :iowait => info[5].to_i,
65
+ :irq => info[6].to_i,
66
+ :softirq => info[7].to_i,
67
+ :steal => info[8].to_i,
68
+ :guest => info[9].to_i,
69
+ :guest_nice => info[10].to_i
64
70
  }
65
71
  else
66
72
  if info.size > 2
data/linux-kstat.gemspec CHANGED
@@ -3,7 +3,7 @@ require 'rbconfig'
3
3
 
4
4
  Gem::Specification.new do |gem|
5
5
  gem.name = 'linux-kstat'
6
- gem.version = '0.2.1'
6
+ gem.version = '0.2.2'
7
7
  gem.license = 'Apache-2.0'
8
8
  gem.author = 'Daniel J. Berger'
9
9
  gem.email = 'djberg96@gmail.com'
@@ -11,7 +11,7 @@ describe Linux::Kstat do
11
11
 
12
12
  context "constants" do
13
13
  it "defines a version constant that is set to the expected value" do
14
- expect(Linux::Kstat::VERSION).to eql('0.2.1')
14
+ expect(Linux::Kstat::VERSION).to eql('0.2.2')
15
15
  expect(Linux::Kstat::VERSION.frozen?).to be(true)
16
16
  end
17
17
  end
@@ -20,6 +20,7 @@ describe Linux::Kstat do
20
20
  it "allows hash style key access" do
21
21
  expect(subject).to respond_to(:[])
22
22
  expect{ subject[:cpu] }.to_not raise_error
23
+ expect(subject[:cpu].keys.size).to eql(10)
23
24
  end
24
25
 
25
26
  it "contains the expected keys and value types" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linux-kstat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: universal-linux
6
6
  authors:
7
7
  - Daniel J. Berger
metadata.gz.sig CHANGED
Binary file