neetodeploy-autoscale 0.3.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: 4adc55bd94d3416cad8f41496e4aee8c06e1906923bba54e87873e9631062291
4
- data.tar.gz: ac8dff8a0410fdc57ba19eadb2f593cfda2954679a11b191938b860287029819
3
+ metadata.gz: c0eba17ecdf99b87711ea1607f3497bba260a773aebf6c064f225916f1bce0ab
4
+ data.tar.gz: 5d38a45b75d33207f55f539955e9dddc27294cdbc402c2f181086f7f343ae4d5
5
5
  SHA512:
6
- metadata.gz: ab9dda392b17c02cf1c240057116095209ec06df29c02f55f3148903ed42954b015db8e3a2d553b5633f4a78ba09359cdd62211cad5178e787bef8b59bac5d54
7
- data.tar.gz: c3ec8eb0aef7d0818731cc582e8ceb23a24bd261fa502a4d01614cef52a02898115711258c730efe80a6a96a55dd4790f273e64eb53329a3aff6541f6417dce8
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"] / 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.3.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.3.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: