redis-stat 0.4.4-java → 0.4.5-java
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.
- checksums.yaml +4 -4
- data/lib/redis-stat.rb +5 -3
- data/lib/redis-stat/constants.rb +0 -1
- data/lib/redis-stat/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: adb9dfe1b8c9d7f87d7a00e92b0c4de2a24fb98d
|
|
4
|
+
data.tar.gz: 181778c3d1c79e470a99b2c0e6f07787a45b56b0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3184422eb7d8f9446838c98dc4ef7550dbdd7a9ff8ff22516373a59a08eebeb79a563e0eccac9e49a4b1d770cffeec4171b29d4eecea6aaafa3a00b99f4dc56a
|
|
7
|
+
data.tar.gz: 6b0fb63b87d5877248da3ea1514b02a27ecf3fafb925b484e8b0f1c534222f54e864db26d8805958b06544315b7278c7ff709d09c05d810d01c755c8fad4c3e7
|
data/lib/redis-stat.rb
CHANGED
|
@@ -27,12 +27,14 @@ class RedisStat
|
|
|
27
27
|
options[:style] = :ascii if windows
|
|
28
28
|
|
|
29
29
|
@hosts = options[:hosts]
|
|
30
|
+
@interval = options[:interval]
|
|
30
31
|
@redises = @hosts.inject({}) { |hash, e|
|
|
31
32
|
host, port = e.split(':')
|
|
32
|
-
hash[e] = Redis.new(Hash[ {:host => host,
|
|
33
|
+
hash[e] = Redis.new(Hash[ {:host => host,
|
|
34
|
+
:port => port,
|
|
35
|
+
:timeout => @interval}.select { |k, v| v } ])
|
|
33
36
|
hash
|
|
34
37
|
}
|
|
35
|
-
@interval = options[:interval]
|
|
36
38
|
@max_count = options[:count]
|
|
37
39
|
@colors = options[:colors] || COLORS
|
|
38
40
|
@csv = options[:csv]
|
|
@@ -391,7 +393,7 @@ private
|
|
|
391
393
|
|
|
392
394
|
get_diff = lambda do |label|
|
|
393
395
|
if dur && dur > 0
|
|
394
|
-
(info.f(host, label) - prev_info.f(host, label)) / dur
|
|
396
|
+
[(info.f(host, label) - prev_info.f(host, label)) / dur, 0].max
|
|
395
397
|
else
|
|
396
398
|
nil
|
|
397
399
|
end
|
data/lib/redis-stat/constants.rb
CHANGED
data/lib/redis-stat/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: redis-stat
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.5
|
|
5
5
|
platform: java
|
|
6
6
|
authors:
|
|
7
7
|
- Junegunn Choi
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-
|
|
11
|
+
date: 2014-08-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: ansi256
|