Skip to content

Instantly share code, notes, and snippets.

@schneems
Created March 7, 2018 16:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save schneems/cb01bec00057571a311fffb6eeb282ba to your computer and use it in GitHub Desktop.
Save schneems/cb01bec00057571a311fffb6eeb282ba to your computer and use it in GitHub Desktop.
gem install rails
rails new foo
cd foo
rails generate controller welcome
cat <<EOT >> app/views/welcome/index.html.erb
<h2>Hello World</h2>
<p>
The time is now: <%= Time.now %>
</p>
EOT
cat <<EOT >> config/routes.rb
Rails.application.routes.draw do
root 'welcome#index'
end
EOT
echo "gem 'derailed_benchmarks'" >> Gemfile
bundle install
bundle exec rake assets:precompile
RAILS_ENV=production RAILS_SERVE_STATIC_FILES=1 RAILS_LOG_TO_STDOUT=1 bundle exec derailed exec perf:test
# 1.571514 0.076660 1.648174 ( 1.957860)
RUBYOPT='--jit' RAILS_ENV=production RAILS_SERVE_STATIC_FILES=1 RAILS_LOG_TO_STDOUT=1 bundle exec derailed exec perf:test
# 1.902912 0.257943 4.568031 ( 2.542607)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment