@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 json() throws IOException { CONSUMER.accept(JsonExperiment.createAddressBook(jsonAddressBookBytes)); }