server_metrics 1.2.12 → 1.2.13

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: ce6751357cb11a50fb04e0be00dbb8c13ca1361d
4
- data.tar.gz: 367228911a31a4080e84e9f8f4df8390d8070d4c
3
+ metadata.gz: b1c071daf7639d12dcceabb2384c0e5ad18763aa
4
+ data.tar.gz: 5ad55bfa4d347bf91bd4f550fde7699710d0b076
5
5
  SHA512:
6
- metadata.gz: a8738ebe560ed97c83ae27389a27abdeef0c19d602c65f9e294d5830b8e1e6acfb2015c5108f7d277697d8c3034dee72543b48bf37380afbcc810561842c84c5
7
- data.tar.gz: 32630edf7458d70c9f447ebfd3a50bf8830a5375c1d1461e9029e071edcf2bdb8379e1b9ca4bde4131c380d0ceb54ba3c82956c8fb70f3becafadc57753ba5a7
6
+ metadata.gz: fa2ac80dd0bb32a58ea790ffdf700a51bd07b978d44d36096a9c444e7db699b0e895956fc2491f7d55cc408dd485fa620af01ae14ebdf4ae4bbc0a2c321dbeee
7
+ data.tar.gz: fe45f5cbf3b20bce06aea88d4130d469a4a1d5b35de1f9ce62b0ae3f21fca55ba869da2d2ee21a5da60d3071f90e0eeea52cb8e782638d1680d2e57f66edaefe
@@ -1,3 +1,7 @@
1
+ # 1.2.13
2
+
3
+ * Handle CPU interrupt rollover
4
+
1
5
  # 1.2.12
2
6
 
3
7
  * Check if disk is symlink during size check
@@ -128,8 +128,9 @@ class ServerMetrics::Cpu < ServerMetrics::Collector
128
128
 
129
129
  if self.time && other.time
130
130
  diff_in_seconds = self.time.to_f - other.time.to_f
131
-
132
- results[:interrupts] = (self.interrupts.to_f - other.interrupts.to_f) / diff_in_seconds
131
+ diff_interrupts = (self.interrupts.to_f - other.interrupts.to_f) / diff_in_seconds
132
+ # If interrupts counter has rolled over, start at 0
133
+ results[:interrupts] = diff_interrupts >= 0 ? diff_interrupts : 0
133
134
  end
134
135
 
135
136
  results
@@ -1,3 +1,3 @@
1
1
  module ServerMetrics
2
- VERSION = '1.2.12'
2
+ VERSION = '1.2.13'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: server_metrics
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.12
4
+ version: 1.2.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andre Lewis
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-11-17 00:00:00.000000000 Z
13
+ date: 2016-01-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler