如何加快Ruby / Rake任务的速度
发布时间:2020-12-16 19:13:49 所属栏目:百科 来源:网络整理
导读:rake –tasks需要大约18秒才能运行.这只是加载所有任务所需的时间,因此我定义的任何任务至少需要花费这么多时间来运行: $time rake --tasksrake db:clean # Cleaning up databaserake passenger:restart # Restart Applicationrake spec # Run specsreal 0m
rake –tasks需要大约18秒才能运行.这只是加载所有任务所需的时间,因此我定义的任何任务至少需要花费这么多时间来运行:
$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 知道为什么rake需要多次? 解决方法
试试
spring
命令行将如下所示: spring rake -T 第一次运行需要更多时间,但后续运行速度非常快. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- keil将程序装入外部FLASH详解
- c – ofstream不在linux上工作
- 你可以在Objective-C中将NSInteger设置为NULL吗?
- 通过adb工具查看sqlite3数据库
- ruby-on-rails – Rails验证full_name
- 推送通知 – 在SWIFT中收到推送通知后控制哪个视图控制器加
- Oracle查询错误分析 ORA-01791 不是SELECTed表达式
- c# – 使用Connection.CreateCommand()时是否需要将ADO.NET
- AM3517之SD卡启动盘恢复NAND flash的数据:x-loader(二)
- 知道这20个正则表达式,能让你少写1,000行代码