Initial commit
This commit is contained in:
20
lib/tasks/trading_fee_test.rake
Normal file
20
lib/tasks/trading_fee_test.rake
Normal file
@@ -0,0 +1,20 @@
|
||||
namespace :trading_fee_test do
|
||||
|
||||
task :amqp, [:config_load_path] => [:environment] do |_t, args|
|
||||
args.with_defaults(:config_load_path => 'config/bench/trade_execution.yml')
|
||||
benches =
|
||||
YAML.load_file(Rails.root.join(args[:config_load_path]))
|
||||
.map(&:deep_symbolize_keys)
|
||||
.each_with_object([]) do |config, memo|
|
||||
Kernel.pp config
|
||||
trade_execution = ::Bench::TradeExecution::AMQP.new(config)
|
||||
trade_execution.run_fee!
|
||||
memo << trade_execution
|
||||
trade_execution.save_report
|
||||
Kernel.puts "Sleep before next bench"
|
||||
sleep 5
|
||||
end
|
||||
|
||||
benches.each {|b| Kernel.pp b.result}
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user