nightfury 0.8.1 → 1.0.0
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.
- data/Gemfile +2 -2
- data/lib/nightfury/metric/avg_time_series.rb +1 -1
- data/lib/nightfury/metric/time_series.rb +5 -5
- data/lib/nightfury/version.rb +1 -1
- metadata +2 -2
data/Gemfile
CHANGED
@@ -32,7 +32,7 @@ module Nightfury
|
|
32
32
|
def decode_data_point(data_point)
|
33
33
|
time, data_with_meta = super(data_point)
|
34
34
|
current_count, current_total, data = data_with_meta.split(',')
|
35
|
-
[data_point[1], data, {current_count: current_count, current_total: current_total}]
|
35
|
+
[data_point[1].to_i.to_s, data, {current_count: current_count, current_total: current_total}]
|
36
36
|
end
|
37
37
|
end
|
38
38
|
end
|
@@ -36,14 +36,14 @@ module Nightfury
|
|
36
36
|
if timestamp
|
37
37
|
timestamp = get_step_time(timestamp).to_i
|
38
38
|
data_point = redis.zrangebyscore(redis_key, 0, timestamp, withscores: true)
|
39
|
-
data_point = data_point.
|
39
|
+
data_point = data_point.last
|
40
40
|
else
|
41
41
|
data_point = redis.zrevrange(redis_key, 0, 0, withscores: true)
|
42
|
-
data_point = data_point.
|
42
|
+
data_point = data_point.last
|
43
43
|
end
|
44
44
|
|
45
45
|
return get_meta ? [nil, {}] : nil if data_point.nil?
|
46
|
-
return get_meta ? [nil, {}] : nil if data_point[1] ==
|
46
|
+
return get_meta ? [nil, {}] : nil if data_point[1] == 0.0
|
47
47
|
|
48
48
|
time, data, meta_value = decode_data_point(data_point)
|
49
49
|
get_meta ? [{time => data}, meta_value] : {time => data}
|
@@ -53,7 +53,7 @@ module Nightfury
|
|
53
53
|
return nil unless redis.exists(redis_key)
|
54
54
|
timestamp = get_step_time(timestamp).to_i
|
55
55
|
data_point = redis.zrangebyscore(redis_key, timestamp, timestamp, withscores: true)
|
56
|
-
data_point = data_point.
|
56
|
+
data_point = data_point.last
|
57
57
|
return get_meta ? [nil, {}] : nil if data_point.nil?
|
58
58
|
time, data, meta_value = decode_data_point(data_point)
|
59
59
|
result = get_meta ? [{time => data}, meta_value] : {time => data}
|
@@ -139,7 +139,7 @@ module Nightfury
|
|
139
139
|
end
|
140
140
|
|
141
141
|
def decode_many_data_points(data_points)
|
142
|
-
data_points = data_points.each_slice(2).map {|pair| pair }
|
142
|
+
#data_points = data_points.each_slice(2).map {|pair| pair }
|
143
143
|
result = {}
|
144
144
|
data_points.each do |data_point|
|
145
145
|
time, data = decode_data_point(data_point)
|
data/lib/nightfury/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nightfury
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-05-13 00:00:00.000000000 Z
|
14
14
|
dependencies: []
|
15
15
|
description: Nightfury is a reporting/analytics backend written on Redis
|
16
16
|
email:
|