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 +4 -4
- data/lib/neetodeploy/autoscale/middleware.rb +3 -3
- data/lib/neetodeploy/autoscale/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0eba17ecdf99b87711ea1607f3497bba260a773aebf6c064f225916f1bce0ab
|
4
|
+
data.tar.gz: 5d38a45b75d33207f55f539955e9dddc27294cdbc402c2f181086f7f343ae4d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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 = (
|
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
|
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
|
+
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-
|
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:
|