I’m almost finished implementing pluginaweek’s state_machine gem and I’d like to try and measure something before I implement it so I can remeasure afterwards and see a difference. Right now there’s a ton of condition logic in the views to deem whether or not an object is in certain state.
My first guess was to look at the load time of that main view, in my server log.
There’s a variety of performance testing tools you can use. The simplest is probably Apache’s “ab” and on the more complex/flexible end is Apache Jmeter.
The process is simple:
This is obviously a very broad overview, but that’s the gist. The important thing is to use a consistent metric and a consistent set of test conditions. E.g. the same command-line options for ‘ab’ or the same test plan for jmeter.
PS – Realistically, I wouldn’t expect a big win from the changes you’re describing. The real win is likely in code readability and maintainability.