fluent-plugin-flowcounter 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.1.5
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "fluent-plugin-flowcounter"
8
- s.version = "0.1.4"
8
+ s.version = "0.1.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["TAGOMORI Satoshi"]
12
- s.date = "2012-04-24"
12
+ s.date = "2012-05-25"
13
13
  s.description = "Plugin to counts messages/bytes that matches, per minutes/hours/days"
14
14
  s.email = "tagomoris@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -125,7 +125,7 @@ class Fluent::FlowCounterOutput < Fluent::Output
125
125
  if @count_all
126
126
  es.each {|time,record|
127
127
  c += 1
128
- b += record.keys.inject(0){|s,k| s + record[k].bytesize}
128
+ b += record.to_msgpack.bytesize
129
129
  }
130
130
  else
131
131
  es.each {|time,record|
@@ -233,6 +233,7 @@ count_keys message
233
233
  data = emits[0]
234
234
  assert_equal 'flowcount', data[0] # tag
235
235
  assert_equal 60*5, data[2]['count']
236
- assert_equal 60*5*20, data[2]['bytes']
236
+ msgpack_size = {'f1' => 'abcde', 'f2' => 'vwxyz', 'f3' => '0123456789'}.to_msgpack.bytesize * 5 * 60
237
+ assert_equal msgpack_size, data[2]['bytes']
237
238
  end
238
239
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-flowcounter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-24 00:00:00.000000000 Z
12
+ date: 2012-05-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd
@@ -189,7 +189,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
189
189
  version: '0'
190
190
  segments:
191
191
  - 0
192
- hash: 3237314410143149168
192
+ hash: -3216219902854722825
193
193
  required_rubygems_version: !ruby/object:Gem::Requirement
194
194
  none: false
195
195
  requirements: