Ejemplo n.º 1
0
        public void Setup()
        {
            _uSerializer          = new USerializerBenchmark <BookShelf>();
            _messagePackBenchmark = new MessagePackBenchmark <BookShelf>();
            _cerasBenchmark       = new CerasBenchmark <BookShelf>();
            _toSerialize          = Data(10000);

            _uSerializer.Init(_toSerialize);
            _messagePackBenchmark.Init(_toSerialize);
            _cerasBenchmark.Init(_toSerialize);
        }
Ejemplo n.º 2
0
        private BookShelf Data(int nToCreate)
        {
            var lret = new BookShelf("private member value")
            {
                Books = Enumerable.Range(1, nToCreate).Select(i => new Book
                {
                    Id       = i,
                    Title    = $"Book {i}",
                    BookData = CreateAndFillByteBuffer(),
                }
                                                              ).ToList()
            };

            return(lret);
        }