aboutsummaryrefslogblamecommitdiffstats
path: root/railties/doc/guides/benchmarking_and_profiling/preamble.txt
blob: bba821779337d306cfb05571a1eab3a668af9445 (plain) (tree)













































                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
Benchmarking and Profiling Rails
================================
Matthew Bergman <MzbPhoto@gmail.com>
v0.5, September 2008

You have successfully written a well tested ground breaking Social Marketing Network and have successfully deployed by Hand/Capistrano/Vlad to your shiny VPS. You are ready to go live after a few beta tests. But you're finding there is a problem. Everything was working wonderfully on your development setup, but now with fifty or a hundred people using your application at the same time things have slowed to a crawl. Pages are being dropped and mysql is giving people timeout errors. How are we going to fix this. It's time to Benchmark and Profile your application. 

Benchmarking and Profiling is an important part of the development process that is talked about nearly enough for most beginning developers. Its hard enough learning a language and successfully writing an application. But without a firm understanding optimization, production ready apps are a near impossibility. No matter how well you code, or how much you know about a language there is always something that will trip up your application. 

This article is my attempt to give the basic knowledge and methodology needed to optimize your application as painlessly as possible. We are are attempting this on two fronts. Both as a straight explanation and also through a real example of how benchmarking can speed up an application. 

The main things that are covered are 

* The basics of statistical analysis
* Methodology behind benchmarking and profiling
* Reading the log file for optimization
* Performance Unit tests
* Working with Ruby-Prof
* HTTPREF #because you should know it
* Overview of dedicated analysis options

There are a lot of areas we need to cover so lets start. 


include::definitions.txt[]

include::basics.txt[]

include::statistics.txt[]

include::edge rails features.txt[]

include::rubyprof.txt[]

include::digging_deeper.txt[]

include::gameplan.txt[]

include::appendix.txt[]