info.setDestination(this.destination);
info.setStartTime(this.startTime);
info.setStarted(this.started);
ConsumerInfoWriter writer = new ConsumerInfoWriter();
ConsumerInfoReader reader = new ConsumerInfoReader();
ConsumerInfo testInfo = null;
try {
int count = 100000;
long startTime = System.currentTimeMillis();
for (int i = 0; i < count; i++){
byte[] data = writer.writePacketToByteArray(info);
testInfo = (ConsumerInfo) reader.readPacketFromByteArray(data);
}
long finishTime = System.currentTimeMillis();
long totalTime = finishTime-startTime;
long ps = (count * 1000)/totalTime;
System.out.println("Time taken :" + totalTime + " for " + count + "iterations, = " + ps +" per sec.");