public void eventPublishingPerformance() throws InterruptedException {
EventDispatcher dispatcher = EventDispatchers
.newJetlangEventDispatcher(null, null);
int countOfEvents = 5000000;
final CountDownLatch latch = new CountDownLatch(countOfEvents);
dispatcher.addHandler(new EventHandler() {
@Override
public void onEvent(Event event) {
latch.countDown();
}