mirror of
https://github.com/elastic/logstash.git
synced 2025-04-23 22:27:21 -04:00
- add grok perf test
This commit is contained in:
parent
ad3839f4c1
commit
e63db45b94
1 changed files with 31 additions and 0 deletions
|
@ -311,4 +311,35 @@ describe LogStash::Filters::Grok do
|
|||
insist { subject["foo-bar"] } == "hello"
|
||||
end
|
||||
end
|
||||
|
||||
describe "performance test" do
|
||||
event_count = 100000
|
||||
min_rate = 4000
|
||||
|
||||
max_duration = event_count / min_rate
|
||||
input = "Nov 24 01:29:01 -0800"
|
||||
config <<-CONFIG
|
||||
input {
|
||||
generator {
|
||||
count => #{event_count}
|
||||
message => "Mar 16 00:01:25 evita postfix/smtpd[1713]: connect from camomile.cloud9.net[168.100.1.3]"
|
||||
}
|
||||
}
|
||||
filter {
|
||||
grok {
|
||||
match => [ "message", "%{SYSLOGLINE}" ]
|
||||
singles => true
|
||||
overwrite => [ "message" ]
|
||||
}
|
||||
}
|
||||
output { null { } }
|
||||
CONFIG
|
||||
|
||||
2.times do
|
||||
agent do
|
||||
puts "grok parse rate: #{event_count / @duration}"
|
||||
insist { @duration } < max_duration
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue