2021-03-11 19:13:27 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
return if Rails.env.production?
|
|
|
|
|
|
|
|
namespace :benchmark do
|
2023-07-09 08:55:56 +05:30
|
|
|
desc 'Benchmark | Banzai pipeline/filters (optionally specify FILTER=xxxxxFilter)'
|
2021-03-11 19:13:27 +05:30
|
|
|
RSpec::Core::RakeTask.new(:banzai) do |t|
|
|
|
|
t.pattern = 'spec/benchmarks/banzai_benchmark.rb'
|
2023-07-09 08:55:56 +05:30
|
|
|
t.rspec_opts = if ENV.key?('FILTER')
|
|
|
|
['--tag specific_filter']
|
|
|
|
else
|
|
|
|
['--tag \~specific_filter']
|
|
|
|
end
|
|
|
|
|
2021-03-11 19:13:27 +05:30
|
|
|
ENV['BENCHMARK'] = '1'
|
|
|
|
end
|
|
|
|
end
|