-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Labels
Description
We have a quite complex configuration file (approximately 1500 lines) and I believe that this line is costly: https://github.com/elastic/logstash/blob/master/lib/logstash/pipeline.rb#L26
If I understand correctly this code, a new pipeline is created for every sample()
method, meaning that the configuration is compiled every time.
Meaning that the following test will load and compile 3 times the same configuration:
require "test_utils"
describe "apache common log format" do
extend LogStash::RSpec
config %q{
# Your logstash filter config here
}
sample "apache log in debug" do
insist { subject["level"] } == "DEBUG"
end
sample "apache log in info" do
insist { subject["level"] } == "INFO"
end
sample "apache log with stack trace" do
insist { subject["stacktrace"] } == "oups!"
end
end
Would it be possible to configure this behavior ? We have 300+ samples and running our tests suite is really slow.
Having said that I think that this behavior should be the default. If I do want to use a different configuration I can call config
again with the new configuration, no ?
gquintana, amaury-d and b2az