fluent-plugin-unique-counter 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -4
- data/fluent-plugin-unique-counter.gemspec +2 -2
- data/lib/fluent/plugin/out_unique_counter.rb +1 -1
- data/test/test_unique_counter.rb +13 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc9b2ffc5cbb49bd469c7a15e2db1a8f2046d3a6
|
4
|
+
data.tar.gz: ce098bb2f6a3481cd7d7f2b06db4bee20cdb16fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc19e4fa6ff43a6b7115c8f5858cc73552f739fd69c40a5267221050de1ea1d0c62410657ee3116459f665b0a94f409b7b470f62f6661230211bf4cc5bcae04f
|
7
|
+
data.tar.gz: 86853e327f8cbbb57dc8459adcd6c1bbcaef3cb22434ffac50b47f3f90d48068ff6bd2e528cdf3382ba944ebe9b2776ff56d9ed551416a1ce1852480402d7ee9
|
data/README.md
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
-
# Fluent unique counter plugin
|
1
|
+
# Fluent unique counter plugin
|
2
|
+
|
3
|
+
[![Build Status](https://travis-ci.org/aiming/fluent-plugin-unique-counter.png?branch=master)](https://travis-ci.org/aiming/fluent-plugin-unique-counter)
|
4
|
+
[![Gem Version](https://badge.fury.io/rb/fluent-plugin-unique-counter.png)](http://badge.fury.io/rb/fluent-plugin-unique-counter)
|
2
5
|
|
3
6
|
This plugin purpose is simple monitoring (countup only).
|
4
7
|
This was referred from [fluent-plugin-numeric-counter](https://github.com/tagomoris/fluent-plugin-numeric-counter). Thanks! :)
|
@@ -63,7 +66,7 @@ echo '{"user_id": 1003}' | fluent-cat test.api.uga
|
|
63
66
|
2013-10-21T22:07:08+09:00 count.up {"unique_count":3}
|
64
67
|
```
|
65
68
|
|
66
|
-
##
|
69
|
+
## config params
|
67
70
|
|
68
71
|
- count_interval
|
69
72
|
|
@@ -85,9 +88,9 @@ echo '{"user_id": 1003}' | fluent-cat test.api.uga
|
|
85
88
|
|
86
89
|
Apache License v2.0.
|
87
90
|
|
88
|
-
##
|
91
|
+
## Copyright
|
89
92
|
|
90
|
-
|
93
|
+
Copyright (c) 2013 Aiming Inc.
|
91
94
|
|
92
95
|
|
93
96
|
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/aiming/fluent-plugin-unique-counter/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
|
@@ -4,8 +4,8 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "fluent-plugin-unique-counter"
|
7
|
-
spec.version = "0.1.
|
8
|
-
spec.authors = ["Keiji Matsuzaki"]
|
7
|
+
spec.version = "0.1.3"
|
8
|
+
spec.authors = ["Keiji Matsuzaki", "Takesato"]
|
9
9
|
spec.email = ["futoase@gmail.com"]
|
10
10
|
spec.summary = %q{fluentd unique counter plugin.}
|
11
11
|
spec.description = %q{This plugin is use of count up to unique attribute.}
|
data/test/test_unique_counter.rb
CHANGED
@@ -10,6 +10,12 @@ class OutUniqueCounterTest < Test::Unit::TestCase
|
|
10
10
|
Timecop.return
|
11
11
|
end
|
12
12
|
|
13
|
+
CONFIG_ERROR = %[
|
14
|
+
tag api.production.login
|
15
|
+
unique_key user_id
|
16
|
+
unit years
|
17
|
+
]
|
18
|
+
|
13
19
|
CONFIG_INTERVAL_10 = %[
|
14
20
|
tag api.production.login
|
15
21
|
unique_key user_id
|
@@ -41,7 +47,13 @@ class OutUniqueCounterTest < Test::Unit::TestCase
|
|
41
47
|
]
|
42
48
|
|
43
49
|
def create_driver(conf = CONFIG, tag = 'test')
|
44
|
-
Fluent::Test::OutputTestDriver.new(Fluent::
|
50
|
+
Fluent::Test::OutputTestDriver.new(Fluent::UniqueCounterOutput, tag).configure(conf)
|
51
|
+
end
|
52
|
+
|
53
|
+
def test_config_error
|
54
|
+
assert_raise Fluent::ConfigError do
|
55
|
+
d1 = create_driver(CONFIG_ERROR, 'uniq.countup')
|
56
|
+
end
|
45
57
|
end
|
46
58
|
|
47
59
|
def test_unique_count_interval_10
|
metadata
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-unique-counter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Keiji Matsuzaki
|
8
|
+
- Takesato
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2013-
|
12
|
+
date: 2013-12-16 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: bundler
|