mirror of
https://github.com/elastic/logstash.git
synced 2025-04-21 13:18:16 -04:00
Fixes #3457 Add `rake benchmark:run` task to run micro benchmark on specific part of the code, it's uses the benchmark-ips gem to generate gem. See https://github.com/evanphx/benchmark-ips for usage
8 lines
270 B
Ruby
8 lines
270 B
Ruby
namespace :benchmark do
|
|
desc "Run benchmark code in benchmark/*.rb"
|
|
task :run => ["test:setup"] do
|
|
path = File.join(LogStash::Environment::LOGSTASH_HOME, "benchmark", "*.rb")
|
|
Dir.glob(path).each { |f| require f }
|
|
end
|
|
end
|
|
task :benchmark => "benchmark:run"
|