result[0] = System.nanoTime() - tStart;
log.infof("Java serialization read duration = %d ns", result[0]);
}
private byte[] writeWithProtoStream(User user, long[] result) throws IOException, DescriptorParserException {
Configuration cfg = new ConfigurationBuilder().setLogOutOfSequenceWrites(false).build();
SerializationContext ctx = createContext(cfg);
ByteArrayOutputStream out = new ByteArrayOutputStream(1024);
long tStart = System.nanoTime();
for (int i = 0; i < NUM_INNER_LOOPS; i++) {