neetodeploy-autoscale 0.4.0 → 0.5.0

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
  SHA256:
3
- metadata.gz: 7ac41afdf5167983ced54868a0c75d2e909e713b5a540d90373f9433336c5bb7
4
- data.tar.gz: e806a42f873bb3e8c40e63db076b4043d38c8ffbe6e04dd31591519879ba28fc
3
+ metadata.gz: c0eba17ecdf99b87711ea1607f3497bba260a773aebf6c064f225916f1bce0ab
4
+ data.tar.gz: 5d38a45b75d33207f55f539955e9dddc27294cdbc402c2f181086f7f343ae4d5
5
5
  SHA512:
6
- metadata.gz: 315e2811f8fae61526706f1abd9bc3ac29b5422b116209b061934fa79a015e98b5c8fc500d0c506fc66a265e35a3bb7360c130f6c60d939f369aad5ca53e7d66
7
- data.tar.gz: 5dd04e693a74c96944866133ceacf0fe37359b1ac919249fca883c37d4162c3a0b8689593a666ca0e9181ce0fbc31fa6d53290da5c0b573ce2c58d8cf145dc29
6
+ metadata.gz: fdad9d224da3024944b8f92d5157b9aeee1bbabac81d9d757efb0811cc265720381f4ae88db36fc985381ff5f179d30a4236ca2a5346d0e653041ee5464b2eea
7
+ data.tar.gz: b98a32aab20efb3228968ed211523d947cce385c275e83159c108aa4252f6817b633077b65f2699df7af77a5a801ed445c2dda7a734f9f93601f8cf0268d94eb
@@ -31,17 +31,17 @@ module Neetodeploy
31
31
  def started_at(env)
32
32
  return nil unless env["HTTP_X_REQUEST_START"].present?
33
33
 
34
- Time.at(env["HTTP_X_REQUEST_START"].to_i / 1000)
34
+ env["HTTP_X_REQUEST_START"].to_i
35
35
  end
36
36
 
37
37
  def network_time(env)
38
38
  env["puma.request_body_wait"].to_i
39
39
  end
40
40
 
41
- def queue_time(now = Time.now, env)
41
+ def queue_time(now = Time.now.to_f * 1000, env)
42
42
  return if started_at(env).nil?
43
43
 
44
- queue_time = ((now - started_at(env)) * 1000).to_i
44
+ queue_time = (now - started_at(env)).round
45
45
  queue_time -= network_time(env)
46
46
 
47
47
  queue_time.positive? ? queue_time : 0
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Neetodeploy
4
4
  module Autoscale
5
- VERSION = "0.4.0"
5
+ VERSION = "0.5.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neetodeploy-autoscale
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sreeram Venkitesh
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-05-06 00:00:00.000000000 Z
11
+ date: 2024-05-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: For automatically scaling your Rails application based on network metrics
14
14
  email: