@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 msgPack() throws IOException { CONSUMER.accept(MsgPackExperiment.createAddressBook(msgPackAddressBookBytes)); }