public void Setup() { foreach (var index in Enumerable.Range(0, samples)) { Console.Out.WriteLine($"prep: {index}"); var d = UtilsCommon.RandomData(topcount, depth); data.Insert(0, d); encodedBsonData.Insert(0, DoBsonEncodeData(d)); encodedBsonDataMongoDriver.Insert(0, DoBsonEncodeDataMongoDriver(d)); encodedMsgPackData.Insert(0, DoMsgPackEncodeData(d)); encodedJsonData.Insert(0, DoJsonEncodeData(d)); var pbd = ProtobufUtils.RandomData(topcount, depth); pbData.Insert(0, pbd); encodedPbData.Insert(0, pbd.ToByteArray()); } Console.Out.WriteLine("Prep done"); GC.Collect(GC.MaxGeneration, GCCollectionMode.Forced); }
public void GlobalSetup() { data = UtilsCommon.RandomData(1000, 6); encodedData = MessagePack.MessagePackSerializer.Serialize(data); }
public void Setup() { data = UtilsCommon.RandomData(1000, 6); encodedData = data.ToBson(); }