• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How many Threads ?

 
Valeri Mikhailov
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How many Threads is it enough to test the project?
 
Matt Ghiold
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am personally testing with 50 concurrrent threads, but I think im going a little overboard.
just my $0.02
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The number of threads is just one variable. You might have 1000 threads and never test concurrency. In my test program, I created 20 threads and had them book the *same* flight repeatedly, say 100 times. If at the end of the test the seat count for that flight is reduced by exactly 2000, the test is successfull.
Eugene.
 
Max Habibi
town drunk
( and author)
Sheriff
Posts: 4118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Eugene. You might even want to specifically have your thread delay while holding the lock, so that other threads will try to aquire it's lock, and see what happens. tha is, force a conflict.
remember, locking is the most important part of your code.
HTH,
M, author
The Sun Certified Java Developer Exam with J2SE 1.4
[ December 11, 2002: Message edited by: Max Habibi ]
 
Zhou Can
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could u supply ur testing codes here ?
Thanx ...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic