@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 xml() throws JAXBException { CONSUMER.accept(XmlExperiment.createAddressBook(xmlAddressBookBytes)); }