@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 jsonMsgPack() throws IOException { CONSUMER.accept(JsonMsgPackExperiment.createAddressBook(jsonMsgPackAddressBookBytes)); }