@Setup public void setup() throws JAXBException, IOException { xmlAddressBookBytes = XmlExperiment.createByteArray(XmlExperiment.randomAddressBook()); protobuffAddressBookBytes = ProtobuffExperiment.createByteArray(ProtobuffExperiment.randomAddressBook()); jsonAddressBookBytes = JsonExperiment.createByteArray(JsonExperiment.randomAddressBook()); msgPackAddressBookBytes = MsgPackExperiment.createByteArray(MsgPackExperiment.randomAddressBook()); jsonMsgPackAddressBookBytes = JsonMsgPackExperiment.createByteArray(JsonMsgPackExperiment.randomAddressBook()); }
@Benchmark public void proto() throws InvalidProtocolBufferException { CONSUMER.accept(ProtobuffExperiment.createAddressBook(protobuffAddressBookBytes)); }