saoj
Joined: 05/09/2008 13:26:12
Messages: 15
Offline
|
To prove how fast and highly multithreaded Space4J is, we implemented a stress test program that creates many threads to perform insertion, deletion, search and iteration at the same time in the same indexed Java collection in memory.
You can download the PhoneBookStress.java program by clicking here. The source code is also listed below. (Note that to compile and run this problem you must include the space4.jar in the classpath)
The arguments you must pass to the program are:
number of insert threads
number of delete threads
number of select threads
number of search threads
thread sleep time = how long each thread will sleep after each action
collection initial size = how many elements should the collection has before the threads start
snapshot time = how often should we take a snapshot
After executing the program for some time, hit CTRL+C to print the statistics. Here is an example:
The source code of the PhoneBookStress.java program:
This message was edited 3 times. Last update was at 05/09/2008 15:43:46
|