network_resiliency 0.7.12 → 0.7.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/network_resiliency/syncer.rb +3 -1
- data/lib/network_resiliency/version.rb +1 -1
- data/lib/network_resiliency.rb +6 -0
- 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: c006caf6d6fefeca3185a0a6a1d75be6bcf1cbc16ed9e1b00f2b147114b8442f
|
4
|
+
data.tar.gz: cad33936cc88b7d586b9b1ca92ab36308e37af11768509e67fb6f20e2af354ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4eaf6bf8b4a4b176a8bd2ae3b79a80fc1a9b01c0d0a6dc486e870d656eb3793c1626dd923c2afd1c2b06774012067d77815a1710e5de44f06d79f098dd8db2b
|
7
|
+
data.tar.gz: 36d9406a01c76ca09d0859194401bbd49a177f644c1ca38d5df3c1fb8ad27907304d8d17ad2c165ced7dcfc67b467ee4e2061ce63e80a884fc8a5a372e994f2b
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -50,7 +50,9 @@ module NetworkResiliency
|
|
50
50
|
NetworkResiliency.redis.disconnect! if NetworkResiliency.redis.connected?
|
51
51
|
|
52
52
|
until @shutdown
|
53
|
-
|
53
|
+
NetworkResiliency.redis.with_reconnect do
|
54
|
+
StatsEngine.sync(NetworkResiliency.redis)
|
55
|
+
end
|
54
56
|
|
55
57
|
sleep(SLEEP_DURATION)
|
56
58
|
end
|
data/lib/network_resiliency.rb
CHANGED
@@ -257,6 +257,12 @@ module NetworkResiliency
|
|
257
257
|
# record stats
|
258
258
|
key = [ adapter, action, destination ].join(":")
|
259
259
|
stats = StatsEngine.add(key, duration)
|
260
|
+
|
261
|
+
if stats.n > RESILIENCY_SIZE_THRESHOLD * 4
|
262
|
+
# downsample to age out old stats
|
263
|
+
stats.scale!(50)
|
264
|
+
end
|
265
|
+
|
260
266
|
tags = {
|
261
267
|
adapter: adapter,
|
262
268
|
destination: destination,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: network_resiliency
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Pepper
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|