logfile_interval 2.1.4 → 2.1.5
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2744d333999683078bcd1e6251df9f4a77592ba
|
4
|
+
data.tar.gz: 39977126f145556de0e49a5bcd75fae80c862dc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e23e0e91fb21f9fb39e40fc9ca002fbafec454914de10f98951f42b39c9c8e19339d8db508ae86d6489c4aff810f118952af673b1e5cd799f8783c44bb82cf9
|
7
|
+
data.tar.gz: f3e73d0ddd1d07611bfe8476a823dcc5eed323d866404ee782f10afc217389e96f5b7ec8109c4781a11dbb06b888f2d4ebda9050cbf82f0c8a89c000399c6d4e
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module LogfileInterval
|
2
|
+
module Aggregator
|
3
|
+
class FirstValue < Base
|
4
|
+
def initialize(options = {})
|
5
|
+
super(options)
|
6
|
+
@val = {}
|
7
|
+
end
|
8
|
+
|
9
|
+
def add(value, group_by = nil)
|
10
|
+
@val[key(group_by)] = value
|
11
|
+
@size.increment(key(group_by))
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module LogfileInterval
|
2
|
+
module Aggregator
|
3
|
+
class LastValue < Base
|
4
|
+
def initialize(options = {})
|
5
|
+
super(options)
|
6
|
+
@val = {}
|
7
|
+
end
|
8
|
+
|
9
|
+
def add(value, group_by = nil)
|
10
|
+
if !@val[key(group_by)]
|
11
|
+
@val[key(group_by)] = value
|
12
|
+
end
|
13
|
+
@size.increment(key(group_by))
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logfile_interval
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Philippe Le Rohellec
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -104,6 +104,8 @@ files:
|
|
104
104
|
- lib/logfile_interval/aggregator/base.rb
|
105
105
|
- lib/logfile_interval/aggregator/count.rb
|
106
106
|
- lib/logfile_interval/aggregator/delta.rb
|
107
|
+
- lib/logfile_interval/aggregator/first_value.rb
|
108
|
+
- lib/logfile_interval/aggregator/last_value.rb
|
107
109
|
- lib/logfile_interval/aggregator/num_lines.rb
|
108
110
|
- lib/logfile_interval/aggregator/registrar.rb
|
109
111
|
- lib/logfile_interval/aggregator/sum.rb
|