rake --tasks를 실행하는 데 약 18 초가 걸립니다.Ruby/Rake 작업 속도를 올리는 방법
$time rake --tasks
rake db:clean # Cleaning up database
rake passenger:restart # Restart Application
rake spec # Run specs
real 0m18.816s
user 0m7.306s
sys 0m5.665s
내 Rakefile을 :
$: << "."
require "rubygems"
require "rspec/core/rake_task"
desc "Run those specs"
task :spec do
RSpec::Core::RakeTask.new(:spec) do |t|
t.rspec_opts = %w{--colour --format progress}
t.pattern = 'spec/*_spec.rb'
end
end
task :default => :spec
어떤 생각이 결과로, 내가 실행하는 데 시간이 최소한이 금액을 취할 것입니다 정의 모든 작업이 모든 작업을로드하는 데 걸리는 바로 시간이다 왜 갈퀴가 많은 시간을 필요로합니까? 감사합니다.
빈 Rakefile에서도 발생합니까? 너를 보여줄 수 있니? –
내 rakefile은 내 게시물에서 볼 수있는 것처럼 rpec 작업 만 포함합니다. – Laughingman
올바른 Rakefile을 가지고 계십니까? 'rake -T'는 Rakefile에 정의되어 있지 않은 (또는 포함되어있는) Passenger restart 작업을 보여줍니다. –