« Back to blog

Generating a Trample configuration file from a Rails server log

Below is a Rake Task to parse a Rails server log using Timber to generate a Trample configuration file for load testing.

Just download Timber from https://github.com/cainlevy/timber and copy it into your rails app's: /vender/plugins/cainlevy-timber

Then copy this task into: /lib/tasks

Then run with: rake trample:generate LOG=log/development.log"

(Don't forget to convert any filtered parameters like passwords from [FILTERED] to the actual value.)