Skip to content

Commit

Permalink
use rspec :performance tag
Browse files Browse the repository at this point in the history
  • Loading branch information
colinsurprenant committed Mar 20, 2014
1 parent 62d4965 commit d46295e
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions spec/codecs/json.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
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
Expand All @@ -36,7 +36,7 @@
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
Expand Down
4 changes: 2 additions & 2 deletions spec/event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@

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]"] }
Expand Down Expand Up @@ -175,7 +175,7 @@
end
end

it "timestamp parsing speed", :if => ENV["SPEEDTEST"] do
it "timestamp parsing speed", :performance => true do
warmup = 10000
count = 1000000

Expand Down
2 changes: 1 addition & 1 deletion spec/filters/date_performance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
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
Expand Down
2 changes: 1 addition & 1 deletion spec/filters/grok.rb
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@
end
end

describe "performance test", :if => ENV["SPEEDTEST"] do
describe "performance test", :performance => true do
event_count = 100000
min_rate = 4000

Expand Down
2 changes: 1 addition & 1 deletion spec/filters/kv.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@

end

describe "speed test", :if => ENV["SPEEDTEST"] do
describe "speed test", :performance => true do
count = 10000 + rand(3000)
config <<-CONFIG
input {
Expand Down
2 changes: 1 addition & 1 deletion spec/speed.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require "test_utils"

describe "speed tests" do
describe "speed tests", :performance => true do
extend LogStash::RSpec
count = 1000000

Expand Down

0 comments on commit d46295e

Please sign in to comment.