Package org.simplesim.examples.testing
Class EventQueueTest
java.lang.Object
org.simplesim.examples.testing.EventQueueTest
Performance test and comparison of various implementations of 
EventQueue
 
 All methods of the event queue are tested and evaluated. The size of the queue and number of test
 are adjusted by changing the countXXX constants.
- 
Constructor SummaryConstructorsConstructorDescriptionEventQueueTest(org.simplesim.examples.testing.EventQueueTest.QueueType queueType) 
- 
Method SummaryModifier and TypeMethodDescriptionlongTest for dequeuing all current eventslongTest for requeuing the current eventlongTest for look-up operations of an event queuestatic voidlongInitializes the event queue withcountTotalevents
- 
Constructor Details- 
EventQueueTestpublic EventQueueTest(org.simplesim.examples.testing.EventQueueTest.QueueType queueType) 
 
- 
- 
Method Details- 
populateEventQueuepublic long populateEventQueue()Initializes the event queue withcountTotalevents
- 
doRequeueNextEventpublic long doRequeueNextEvent()Test for requeuing the current eventDequeues the current event and enqueues it again with a new time stamp, using dequeue()andenqueue(Time,E)functionality. Does not change the size of the queue.
- 
doSearchAndDequeueEventpublic long doSearchAndDequeueEvent()Test for look-up operations of an event queueSearches for an event and requeues it with a new time stamp, using getTime(E),dequeue(E)andenqueue(Time,E)functionality. Decreases the size of the queue bycountSADEevents.
- 
doDequeueAllNextEventspublic long doDequeueAllNextEvents()Test for dequeuing all current eventsDequeues the all current events with the same time stamp, using dequeueAll()functionality. The event queue will be empty after this method.
- 
main- Parameters:
- args-
 
 
-