Sha256: a0f3acbbe2796e461e38277bd5e6d1e72ab1686ab1ddef4d453eb11aabf3b5b5
Contents?: true
Size: 1.07 KB
Versions: 1
Compression:
Stored size: 1.07 KB
Contents
require_relative 'helper' require 'fluent/plugin/out_grep' # setup Fluent::Test.setup config = %[ input_key message grep INFO exlude something remove_tag_prefix foo add_tag_prefix bar ] time = Time.now.to_i tag = 'foo.bar' driver = Fluent::Test::OutputTestDriver.new(Fluent::GrepOutput, tag).configure(config) # bench require 'benchmark' message = "2013/01/13T07:02:11.124202 INFO GET /ping" n = 100000 Benchmark.bm(7) do |x| x.report { driver.run { n.times { driver.emit({'message' => message}, time) } } } end # BEFORE TAG_PROC # user system total real # 2.560000 0.030000 2.590000 ( 3.169847) # AFTER TAG_PROC (0.2.1) # user system total real # 2.480000 0.040000 2.520000 ( 3.085798) # AFTER regexps, exludes (0.3.0) # user system total real # 2.700000 0.050000 2.750000 ( 3.340524) # AFTER add_tag_suffix, remove_tag_suffix (0.3.3) # user system total real # 2.470000 0.020000 2.490000 ( 3.012241)
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fluent-plugin-grep-0.3.4 | test/bench_out_grep.rb |