This program records times for various fine-grained synchronization schemes, and provides some ways of measuring them over different context parameters. SynchronizationTimer Click start . Clicking stop cancels the run.
Cancellation can take a while when there are a lot of threads.
For more explanation about tested classes, see Documentation for util.concurrent Synchronization schemes are tested around implementations and subclasses of RNG , which is just a hacked random number generator class. Objects of this class have just enough state and require just enough computation to be reasonable minimal targets. Computation of each random number is padded a bit with an adjustable compute loop running a random number of times to avoid getting schedulers locked into uninteresting patterns. The time listed is the average time it took to do one iteration, in microseconds. Thread construction time is NOT included in these times.