Writing Performance Tests

1 view
Skip to first unread message

Sean Kellogg

unread,
Dec 21, 2009, 5:32:01 PM12/21/09
to merb
I've been humming along on a merb app for a while now and have reached a bit of a bottleneck performance wise that I want to start tackling systematically. But instead of just "feeling" like I'm making progress, I'd like to have a suite of tests that I can run which will dump out performance numbers I can analyze.

My efforts to find documentation on how one would do this in merb have gotten me nowhere. Is there anything like the Rails performance testing system in merb? Maybe some straightforward way of using plain old Benchmark?

Any and all assistance is appreciated.

-Sean

--
Sean Kellogg
e: skel...@probonogeek.org

Matt Aimonetti

unread,
Dec 21, 2009, 5:51:22 PM12/21/09
to me...@googlegroups.com
Merb doesn't have performance tests, instead, you might want to use tools like httperf or siege to benchmark your app and see the limits with 1 or many concurrent requests, test different paths, different load settings etc...

- Matt


--

You received this message because you are subscribed to the Google Groups "merb" group.
To post to this group, send email to me...@googlegroups.com.
To unsubscribe from this group, send email to merb+uns...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/merb?hl=en.



Sean Kellogg

unread,
Dec 21, 2009, 6:16:37 PM12/21/09
to me...@googlegroups.com
That's sort of disappointing... I mean, httperf and siege are great tools, but I was hoping to be able to setup various data "situations" programatically before running the benchmark, as the program is very data-specific.

Guess I can setup the data and then launch siege at the end of the script... just feels far less satisfying.

Thanks,
Sean

On Monday 21 December 2009 02:51:22 pm Matt Aimonetti wrote:
> Merb doesn't have performance tests, instead, you might want to use tools
> like httperf or siege to benchmark your app and see the limits with 1 or
> many concurrent requests, test different paths, different load settings
> etc...
>
> - Matt

--
Sean Kellogg
e: skel...@probonogeek.org

Jonathan Stott

unread,
Dec 21, 2009, 6:31:12 PM12/21/09
to me...@googlegroups.com
On Mon, 21 Dec 2009 15:16:37 -0800
Sean Kellogg <skel...@probonogeek.org> wrote:

> That's sort of disappointing... I mean, httperf and siege are great tools, but I was hoping to be able to setup various data "situations" programatically before running the benchmark, as the program is very data-specific.
>
> Guess I can setup the data and then launch siege at the end of the script... just feels far less satisfying.
>
> Thanks,
> Sean
>


Whilst it doesn't have any built in tools for it, you can probably use a setup similar to the test environment to set up your merb env programatically. This is mostly the line:

Merb.start_environment(:adapter => 'runner') # perhaps also :testing => true is needed, along with a correct ENV

Once you have that, it should be possible to use normal benchmarking tools with the request method to test. Though, if it's mostly data you're testing, perhaps the methods to process it would be better on your model, where they can be tested and benched normally? (And independent of the stack, which shouldn't be a significant factor in data-heavy tasks anyway.)

Regards
Jon.

Reply all
Reply to author
Forward
0 new messages