final ObjectName objectName = createTestDummy( "testNotificationPerformance" );
final TestDummyMBean test = newProxy( objectName, TestDummyMBean.class );
final int ITER = 10;
final int COUNT = 1024 * 1024;
for( int iter = 0; iter < ITER; ++iter )
{
final long elapsed =
test.emitNotifications( "NotificationPerformanceTest.test", COUNT );
final float rate = (elapsed == 0) ? (float)0.0 : (1000 * ((float)COUNT / (float)elapsed));
final String rateString = (elapsed == 0) ? "N/A" : "" + (int)rate;
System.out.println( "Millis to emit " + COUNT + " Notifications: " + elapsed +
" = " + rateString + " notifications/sec" );
}