Search the web
Sign In
New User? Sign Up
junitperf
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Question on concurrent user   Message List  
Reply | Forward Message #81 of 94 |
To Whom It May Concern:

This is the first time, I am using Junit.
I have question.
I ran the following code:
public class MailSortServicePerfTest
{
public static final long toleranceInMillis = 60*1000;

public static Test performanceTestSuite() {

long maxElapsedTimeInMillis = 1000 +
toleranceInMillis;

MailSortBatchServiceTest testCase = new
MailSortBatchServiceTest("testMailSortBatchService");

//the variable maxElapsedTimeInMillis gives the max
time the test cannot be over.
//If it's over the maxElapsedTimeInMillis time than
the test fails
Test timedTest = new TimedTest(testCase,
maxElapsedTimeInMillis);
return timedTest;
}


public static Test loadTestSuite()
{
// users=20 means 20 concurrent users at the same
time
int users = 4;

// iterations=10 means run 10 times. Means run 200
times
int iterations = 1;

// timer = ConstantTimer(1000) means between the
interval between the iterations is 1 seconds.
Timer timer = new ConstantTimer(1000);

long maxElapsedTimeInMillis = 1000;

Test factory = new TestMethodFactory
(MailSortBatchServiceTest.class,"testMailSortBatchService");
Test timedTest = new TimedTest
(factory,maxElapsedTimeInMillis);

LoadTest loadTest = new LoadTest
(timedTest,users,iterations);
loadTest.setEnforceTestAtomicity(true);

return loadTest;
}
public static void main(String args[]) {
// junit.textui.TestRunner.run(performanceTestSuite
());
junit.textui.TestRunner.run(loadTestSuite());
}

}

When I ran the above with 4 users, it gave me a result of 10.359
seconds. When I changed to 100 users, and ran the result it gave me
10.282 seconds. I don't understand why would running 100 users would
actually decrease the time from 10.359 to 10.282 seconds. Is this
10.282 seconds means each user only takes 10.282 seconds or the total
number of seconds for 100 users running this is 10.282 seconds. Can
someone please tell me what the 10.282 seconds means, please.

Any help would be greatly appreciated it.

Thank You.

Yours,

Albert Lam







Tue Mar 21, 2006 6:45 pm

jadeite100
Offline Offline
Send Email Send Email

Forward
Message #81 of 94 |
Expand Messages Author Sort by Date

To Whom It May Concern: This is the first time, I am using Junit. I have question. I ran the following code: public class MailSortServicePerfTest { public...
jadeite100
Offline Send Email
Mar 21, 2006
6:45 pm

... That's correct, it's measuring the response time of each user. I'm not sure how you're seeing output. Paste it in here if you need more help. Mike...
Mike Clark
clarkware
Offline Send Email
Mar 22, 2006
2:58 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help