@Test
public void performanceSmokeTest() throws Exception {

    int warmup = 100000;
    int iterations = 100000;
    int maxTimeToAllow = 10000; // ms time to allow for this test not to fail
    
    Object dummyPayload = new JsonValue("{'test': 'value'}");
    Object dummyContext1 = "reconID: xyz123";
    for (int i = 0; i < warmup; i++) {
        EventEntry measure = Publisher.start(EVENT_PERF_SMOKE_TEST, dummyPayload, dummyContext1);
        measure.end();
    }
    Thread.currentThread().sleep(200); 
    
    long start = System.currentTimeMillis();
    for (int i = 0; i < iterations; i++) {
        EventEntry measure = Publisher.start(EVENT_PERF_SMOKE_TEST, dummyPayload, dummyContext1);
        measure.end();
    }
    long end = System.currentTimeMillis();
    long diff = end - start;
    System.out.println("Smartevent " + iterations + " iterations "
            + "took " + diff + " milliseconds. "
            + "Each start/end event took approx: " + MILLISEC_FORMAT.format(diff/(double)iterations)
            + ". This smoke test allows max " + maxTimeToAllow + " ms ");
    
    Assert.assertTrue(diff < maxTimeToAllow, "Performance warning: " + iterations + " did not complete in the expected max " + maxTimeToAllow + " ms");
}