fluent-plugin-flowcounter 0.3.0 → 0.3.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: daa9d057b7561ba523c9fe27cc4fd24868abe118
4
- data.tar.gz: 7299e8f4524e59065628e266849b96f6bbd2fbd6
3
+ metadata.gz: a4106b69e6d5a5c4e44996ab86bf6bf3220bc11b
4
+ data.tar.gz: fbe0fa0f5c544e265b37e3023a24e0bd66d0ae1f
5
5
  SHA512:
6
- metadata.gz: 6c546c6447fc8d690e443c72acda96ce6d68c5766463bd55e4996e19657989a8ebc019b608da5f3ecf78d208a5fc582816ffe1a65782e5a3fa78ef9c1edcdf91
7
- data.tar.gz: c13511380a7ffe143b06ed6b69be97208065d420cc10c6bae83b18a133fe96b9220b08c181bafd6d530b279d1569c4d14200fb13c09ad66616e434c7048cc1a5
6
+ metadata.gz: d4b7e9a9543eb01212b56b413569fb210bcaa6ea5bc53c2f8aa02371a5c80bc0612e618280c063df6c8be39365f24217e6bded2c793004ce70ea982f84225d0b
7
+ data.tar.gz: 39aa071b23d739acdccea9768036e03953d569fa4493a7a216b89228d65484843df0d5d73ee409458d0b1ad53389995f97d41917b8dcfa61daf705f13cf8f01c
@@ -1,7 +1,7 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  Gem::Specification.new do |gem|
3
3
  gem.name = "fluent-plugin-flowcounter"
4
- gem.version = "0.3.0"
4
+ gem.version = "0.3.1"
5
5
  gem.authors = ["TAGOMORI Satoshi"]
6
6
  gem.email = ["tagomoris@gmail.com"]
7
7
  gem.summary = %q{Fluent plugin to count message flow}
@@ -19,6 +19,7 @@ class Fluent::FlowCounterOutput < Fluent::Output
19
19
  config_param :tag, :string, :default => 'flowcount'
20
20
  config_param :input_tag_remove_prefix, :string, :default => nil
21
21
  config_param :count_keys, :string
22
+ config_param :delimiter, :string, :default => '_'
22
23
 
23
24
  include Fluent::Mixin::ConfigPlaceholders
24
25
 
@@ -98,8 +99,8 @@ class Fluent::FlowCounterOutput < Fluent::Output
98
99
  c = 'count'
99
100
  b = 'bytes'
100
101
  if @aggregate == :tag
101
- c = name + '_count'
102
- b = name + '_bytes'
102
+ c = name + delimiter + 'count'
103
+ b = name + delimiter + 'bytes'
103
104
  end
104
105
  @mutex.synchronize {
105
106
  @counts[c] = (@counts[c] || 0) + counts
@@ -122,11 +123,11 @@ class Fluent::FlowCounterOutput < Fluent::Output
122
123
 
123
124
  def tagged_flush(step)
124
125
  flushed,@counts = @counts,count_initialized(@counts.keys)
125
- names = flushed.keys.select {|x| x.end_with?('_count')}.map {|x| x.chomp('_count')}
126
+ names = flushed.keys.select {|x| x.end_with?(delimiter + 'count')}.map {|x| x.chomp(delimiter + 'count')}
126
127
  names.map {|name|
127
128
  counts = {
128
- 'count' => flushed[name + '_count'],
129
- 'bytes' => flushed[name + '_bytes'],
129
+ 'count' => flushed[name + delimiter + 'count'],
130
+ 'bytes' => flushed[name + delimiter + 'bytes'],
130
131
  }
131
132
  data = generate_output(counts, step)
132
133
  data['tag'] = name
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-flowcounter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - TAGOMORI Satoshi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-12 00:00:00.000000000 Z
11
+ date: 2015-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -98,3 +98,4 @@ summary: Fluent plugin to count message flow
98
98
  test_files:
99
99
  - test/helper.rb
100
100
  - test/plugin/test_out_flowcounter.rb
101
+ has_rdoc: