Saturday, November 14, 2009

Rapid TPS Results using JMeter

Performance testing can certainly be an art. Or a journey into a deep dark cavern. But sometimes there are very simple ways to get a result. Here is the simplest way ever to determine transactions per second, TPS, if you use JMeter and save your results to a .csv file.

On the command line navigate to the directory where your file exists. Sorry but this magic assumes a unix like operating system.

The magic -

type wc -l {filename}
divide this result by the duration of your test in seconds

Potential magic using Windows OS (Untested by me, but found via a Google search)

dir /b c:\temp | find /c /v "~~~"

I like this approach because it allows you to quickly evaluate changes in your results. As you are optimizing an application configuration for performance you can very quickly approximate the throughput as TPS.

Stay tuned for two future posts:

How to quickly move results to MySQL
How to use Rake tasks to manage your results

FYI - I stole this magic from the magician Scott Sims.

Happy Testing!