Please recommend tools for stress-testing plain java methods

Discussions

Performance and scalability: Please recommend tools for stress-testing plain java methods

  1. Could anyone please recommend their favorite tool for multi-threaded stress-test, on plain java classes ?

    In more detail: I'm doing unit-test for my business-logic layer, consisting of plain java methods (only mathematical calculations. No web interface, no session beans, no swing).

    This should be a stress test (the usual - launch multiple threads to periodically invoke a method, and register statistics on correctness & response times)

    Any recommendations would be appreciated . Thanks !
  2. I had a similar requirement, I needed to accurately measure method response times at varying loads but without any major emphasis on capturing failures.

    To test the different tools effects I needed a benchmark and for this I had a simple class which looped calling methods on the test class a few thousand times.

    I tried out the Grinder http://grinder.sourceforge.net and found that if you use the right jdk although it is not designed for this sort of testing it gave results that were in agreement with a base class. The grinder can be configured to generate a variety of loads easily and suppots Jython. Running it with JRocket produced result times that matched the benchmarks from my dumb class. With Suns JDK 1.4 and earlier the result times did not match at all. I did not get round to testing it with JDK 1.5 or any other vendors JDKs.

    I toyed with Junit which prints thest case duration but these added a significant overhead when compared to the the benchmarks.

    I guess you can also use JProbe and Optimizit as well.
    If you try out the Grinder or find a niftier tool, please let me know.
  3. I've worked with JMeter, and i think it's excellent. You can do load tests and stress test.

    You can record a complete session of what you do normally in the application, and later on you could run it exactly the same. If you need it to be dynamic, no problem, you can set it up to receive parameters from the server and use them for the next request.
    You can also simulate multiple users (threads), for as many times as you need it, and you can seperate each request by an specific time rate.

    The framework also has several graphics and logs so you can review the results.

    Hope it helps.

    PS/ if you need a little bit more help, you can write me at acastano1207@hotmail.com