Test Rails Application Performance

If you’re writing Rails applications, you’ll surely want to apply the same performance testing techniques to them. Rails developers have long since recognized that. Rails 3 even included a performance testing framework. And while Rails 4 no longer provides it, the code is still there in the rails-perftest gem.[25]

So should we simply use that gem for Rails performance testing? No, not really. The rails-perftest gem tries to be the Jack of all trades and becomes the master of none. It does benchmarking and profiling, and lets you collect many metrics other than execution time.

At the same time, it doesn’t do enough runs for its benchmarks to be statistically significant. And it doesn’t do any comparison. ...

Get Ruby Performance Optimization now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.