lib/fluent/plugin/out_flowcounter.rb in fluent-plugin-flowcounter-0.1.4 vs lib/fluent/plugin/out_flowcounter.rb in fluent-plugin-flowcounter-0.1.5
- old
+ new
@@ -123,10 +123,10 @@
end
c,b = 0,0
if @count_all
es.each {|time,record|
c += 1
- b += record.keys.inject(0){|s,k| s + record[k].bytesize}
+ b += record.to_msgpack.bytesize
}
else
es.each {|time,record|
c += 1
b += @count_keys.inject(0){|s,k| s + record[k].bytesize}