jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@pivolis.com>
Subject RE: Cactus too slow
Date Sat, 07 Feb 2004 12:41:08 GMT
Hi Kimbuba,

I've timed the cactus test suite itself (which uses cactus). It takes
1mn 40s for 101 tests using Resin 2.1.11. My machine is 1.2GHz. These
tests do not access the database. Roughly a test takes about 1.3
seconds. You need to add extra time like database access. However, if
you're writing unit tests, a database SQL call should usually not take
longer than 70 ms (and the time to get a connection is negligible if
you're using a data source). If it takes more you need some tuning on
your database (like setting correct indexes, etc) :-)

<idea>You can actually even wrap a Cactus test in a JUnitPerf suite if
you wish to perform performance tests...</idea>

Thanks
-Vincent
 
> -----Original Message-----
> From: news [mailto:news@sea.gmane.org] On Behalf Of kimbuba
> Sent: 03 February 2004 00:52
> To: cactus-user@jakarta.apache.org
> Subject: Cactus too slow
> 
> Hello,
> it is normal that for a simple Servlet test  taking about 20-30
seconds to
> testing?
> I'm using cactus from eclipse to a remote (Lan connection) linux
tomcat.
> Thnx in advance for helping!
> kimbuba.
> 
> //I'm testing a simple method that insert an attribute on a request.
> 
> public void testSetRequest(){
> //Initialize class to test
> HelloAction servlet = new HelloAction();
> 
> // Call the method to test, passing an HttpServletRequest object
> servlet.setName("BOB",(HttpServletRequest)request);
> 
> // Perform verification that test was successful
> assertEquals("BOB", (String)request.getAttribute("aName"));
> }
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org



Mime
View raw message