benchmark("Serialize to byte array", inputData.length, new Action() {
public void execute() { sampleMessage.toByteArray(); }
});
benchmark("Serialize to memory stream", inputData.length, new Action() {
public void execute() throws IOException {
sampleMessage.writeTo(new ByteArrayOutputStream());
}
});
if (devNull != null) {
benchmark("Serialize to /dev/null with FileOutputStream", inputData.length, new Action() {
public void execute() throws IOException {