remnant 0.4.8 → 0.4.9

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.
data/lib/remnant/queue.rb CHANGED
@@ -27,11 +27,25 @@ class Remnant
27
27
  app_queue_start = ::Remnant::Discover.results.delete('app_queue_start')
28
28
 
29
29
  if lb_queue_start && fe_queue_start
30
- ::Remnant::Discover.results['queue_lb'] = (fe_queue_start - lb_queue_start) # ms
30
+ ms = (fe_queue_start - lb_queue_start).round(2) # ms
31
+
32
+ # if negative, clamp to 0
33
+ if ms < 0
34
+ ms = 0
35
+ end
36
+
37
+ ::Remnant::Discover.results['queue_lb'] = ms
31
38
  end
32
39
 
33
40
  if fe_queue_start && app_queue_start
34
- ::Remnant::Discover.results['queue_fe'] = (app_queue_start - fe_queue_start) # ms
41
+ ms = (app_queue_start - fe_queue_start).round(2) # ms
42
+
43
+ # if negative, clamp to 0
44
+ if ms < 0
45
+ ms = 0
46
+ end
47
+
48
+ ::Remnant::Discover.results['queue_fe'] = ms
35
49
  end
36
50
  end
37
51
 
@@ -1,3 +1,3 @@
1
1
  class Remnant
2
- VERSION = "0.4.8"
2
+ VERSION = "0.4.9"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remnant
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 8
10
- version: 0.4.8
9
+ - 9
10
+ version: 0.4.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - John 'asceth' Long