}
help();
return;
}
Buffer buf;
LinkedList list=new LinkedList();
ClassConfigurator.getInstance(true);
long start=System.currentTimeMillis();
long stop;
for(int i=0; i < num; i++) {
Message m=new Message(new IpAddress(addr, 5555), new IpAddress(addr, 6666), new byte[256]);
if(add_headers)
addHeaders(m);
list.add(m);
}
start=System.currentTimeMillis();
buf=Util.msgListToByteBuffer(list);
stop=System.currentTimeMillis();
System.out.println("Marshalling a message list of " + list.size() + " elements took " + (stop - start) + "ms.");
start=System.currentTimeMillis();
LinkedList list2=Util.byteBufferToMessageList(buf.getBuf(), buf.getOffset(), buf.getLength());
stop=System.currentTimeMillis();
System.out.println("Unmarshalling a message list of " + list2.size() + " elements took " + (stop - start) + "ms.");
}