Skip to content

Instantly share code, notes, and snippets.

@funny-falcon
Created January 30, 2012 03:28
Show Gist options
  • Save funny-falcon/1702301 to your computer and use it in GitHub Desktop.
Save funny-falcon/1702301 to your computer and use it in GitHub Desktop.
Testing application for GC
git clone git://github.com/RailsApps/rails3-devise-rspec-cucumber.git rails3app
cd rails3app
#lets increase working set
sed -i 's/, :group.*//' Gemfile
sed -i '/^\(group\|end\)/ d' Gemfile
rm Gemfile.lock
bundle install
RAILS_ENV=production bundle exec rake db:migrate
RAILS_ENV=production bundle exec rails runner '(1..20).each{|i| User.create(email: "as#{i}@df.gh", name: "asdf#{i}", password: "asdfghjk")}'
bundle exec rake assets:precompile
gem install passenger
rm -f log/* ; passenger start -e production --max-pool-size 2 --min-instances 2 >/dev/null
siege -b -c 10 -t 3S http://localhost:3000 >/dev/null 2>/dev/null
{
siege -b -c 10 -t 10S http://localhost:3000 2>&1 >/dev/null
siege -b -c 10 -t 10S http://localhost:3000 2>&1 >/dev/null
siege -b -c 10 -t 10S http://localhost:3000 2>&1 >/dev/null
} | grep 'Transaction rate'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment