check-cpu-steal 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/check_cpu_steal/cpu_stats.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc5f8ea9e48832532cf2d8fd93465ea0e5cea932
|
4
|
+
data.tar.gz: 216e4b9aab28e7adbfd6d345e6c6a748876b7534
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 207d320e5966477ca718b3ae90fa66c448e5c5dbf338d40bcafe070105d119f78c7f95abeda965a66c867a314283988cbd80f7f49973363819ebad4beb30de0b
|
7
|
+
data.tar.gz: fbf67b329efa47aff0ede9cac0df54826929a6025c27a1f8f6b62543f5ec9db7c03f023f48273553fb00d57c8407ab111105cecc8ee41e0de65d30838ba62642
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
#
|
2
|
+
# CPU stat collection and calculation
|
3
3
|
#
|
4
4
|
class CpuStats
|
5
5
|
CLASSES = [:user, :nice, :system, :idle, :iowait, :irq,
|
@@ -21,7 +21,7 @@ class CpuStats
|
|
21
21
|
info = read_proc
|
22
22
|
stats = info.split(/\s+/)
|
23
23
|
stats.shift
|
24
|
-
stats.map(&:to_f)
|
24
|
+
stats.map!(&:to_f)
|
25
25
|
Hash[CLASSES.zip(stats)]
|
26
26
|
end
|
27
27
|
|