use rspec :performance tag

This commit is contained in:
Colin Surprenant 2014-03-20 00:10:09 -04:00
parent 62d49653ad
commit d46295ea77
6 changed files with 8 additions and 8 deletions

View file

@ -18,7 +18,7 @@ describe LogStash::Codecs::JSON do
end
end
it "should be fast", :if => ENV["SPEEDTEST"] do
it "should be fast", :performance => true do
json = '{"message":"Hello world!","@timestamp":"2013-12-21T07:01:25.616Z","@version":"1","host":"Macintosh.local","sequence":1572456}'
iterations = 500000
count = 0
@ -36,7 +36,7 @@ describe LogStash::Codecs::JSON do
insist { count } == iterations
puts "codecs/json speed: #{iterations/duration}/sec"
end
context "processing plain text" do
it "falls back to plain text" do
decoded = false

View file

@ -106,7 +106,7 @@ describe LogStash::Event do
end
it "should be fast?", :if => ENV["SPEEDTEST"] do
it "should be fast?", :performance => true do
2.times do
start = Time.now
100000.times { subject["[j][k1]"] }
@ -175,7 +175,7 @@ describe LogStash::Event do
end
end
it "timestamp parsing speed", :if => ENV["SPEEDTEST"] do
it "timestamp parsing speed", :performance => true do
warmup = 10000
count = 1000000

View file

@ -5,7 +5,7 @@ puts "Skipping date tests because this ruby is not jruby" if RUBY_ENGINE != "jru
describe LogStash::Filters::Date, :if => RUBY_ENGINE == "jruby" do
extend LogStash::RSpec
describe "speed test of date parsing", :if => ENV["SPEEDTEST"] do
describe "speed test of date parsing", :performance => true do
it "should be fast" do
event_count = 100000
min_rate = 4000

View file

@ -423,7 +423,7 @@ describe LogStash::Filters::Grok do
end
end
describe "performance test", :if => ENV["SPEEDTEST"] do
describe "performance test", :performance => true do
event_count = 100000
min_rate = 4000

View file

@ -102,7 +102,7 @@ describe LogStash::Filters::KV do
end
describe "speed test", :if => ENV["SPEEDTEST"] do
describe "speed test", :performance => true do
count = 10000 + rand(3000)
config <<-CONFIG
input {

View file

@ -1,6 +1,6 @@
require "test_utils"
describe "speed tests" do
describe "speed tests", :performance => true do
extend LogStash::RSpec
count = 1000000