Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| # See http://m.onkey.org/running-rails-performance-tests-on-real-data | |
| # fixed to work with Rails 3.2.8 | |
| # START : HAX HAX HAX | |
| # Load Rails environment in 'test' mode | |
| RAILS_ENV = "test" | |
| require File.expand_path('../../config/environment', __FILE__) | |
| # Re-establish db connection for 'performance' mode | |
| silence_warnings { RAILS_ENV = "performance" } |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
Create droplet of your liking (ubuntu 12.10 x32)
ssh to root in terminal with your server ip
ssh [email protected]
Add ssh fingerprint and enter password provided in email
with a hat tip to Sublime Text 2 Shortcuts
| ⌘; | autocomplete |
| ⌘⌥B | instant replay |
| ⌘⌥E | search across all tabs |
| # PostgreSQL configuration tuning to improve tests performance of database interactions. | |
| # Look for more detailed description in follow articles: | |
| # - http://rhaas.blogspot.com/2010/06/postgresql-as-in-memory-only-database_24.html | |
| # | |
| # ATTENTION: | |
| # Before appling those settings ensure that you have no important data in your cluster, because those settings | |
| # could cause problems on your production database in case of appliance. | |
| # | |
| # Ensure follow settings have given values. |
| require 'rails_helper' | |
| RSpec.describe TodosController, :type => :controller do | |
| describe "GET #index" do | |
| #describe "POST #create" do | |
| #describe "GET #show" do | |
| #describe "PATCH #update" do (or PUT #update) | |
| #describe "DELETE #destroy" do | |
| #describe "GET #new" do |
by alexander white ©
| wait4eth1() { | |
| CNT=0 | |
| until ip a show eth1 | grep -q UP | |
| do | |
| [ $((CNT++)) -gt 60 ] && break || sleep 1 | |
| done | |
| sleep 1 | |
| } | |
| wait4eth1 |
| # this is a dirty implementation of logger that | |
| # compiles AR queries with trace into /last_request_log.html | |
| # the snippet is useful when optimizing performance of the endpoint | |
| class QueryLogSubscriber < ActiveSupport::LogSubscriber | |
| TRACE_LEVEL = :app | |
| LINES = 5 | |
| IGNORE_CACHED_QUERIES = false | |
| def initialize |