sysbench
Scriptable database and system performance benchmark
... be easily created by implementing pre-defined hooks in user-provided Lua scripts. Can be used as a general-purpose Lua interpreter as well, simply replace #!/usr/bin/lua with #!/usr/bin/sysbench in your script. Execute events for this many seconds with statistics disabled before the actual benchmark run with statistics enabled. This is useful when you want to exclude the initial period of a benchmark run from statistics.