Welcome to mirror list, hosted at ThFree Co, Russian Federation.

SerializerBenchmark.cs « SerializerBenchmark « benchmark - github.com/aspnet/MessagePack-CSharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 71a95e208836351637f06d7bdc83efdadab5bd28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
// Copyright (c) All contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using System.Collections.Generic;
using Benchmark.Fixture;
using Benchmark.Models;
using Benchmark.Serializers;
using BenchmarkDotNet.Attributes;

#pragma warning disable SA1300 // Element should begin with upper-case letter
#pragma warning disable SA1306 // Field names should begin with lower-case letter
#pragma warning disable SA1401 // Fields should be private
#pragma warning disable SA1649 // File name should match first type name

namespace Benchmark
{
    [Config(typeof(BenchmarkConfig))]
    public class AllSerializerBenchmark_BytesInOut
    {
        [ParamsSource(nameof(Serializers))]
        public SerializerBase Serializer;

        // Currently BenchmarkDotNet does not detect inherited ParamsSource so use copy and paste:)
        public IEnumerable<SerializerBase> Serializers => new SerializerBase[]
        {
            new MessagePack_v1(),
            new MessagePack_v2(),
            new MessagePackLz4_v1(),
            new MessagePackLz4_v2(),
            new MsgPack_v2_opt(),
            //new MsgPack_v2_string(),
            //new MsgPack_v2_str_lz4(),
            new ProtobufNetSerializer(),
            new JsonNetSerializer(),
            new BsonNetSerializer(),
            new BinaryFormatterSerializer(),
            new DataContractSerializer(),
            new HyperionSerializer(),
            new JilSerializer(),
            new SpanJsonSerializer(),
            new Utf8JsonSerializer(),
            new SystemTextJsonSerializer(),
            new MsgPackCliSerializer(),
            new FsPicklerSerializer(),
            new CerasSerializer(),
            new OdinSerializer_(),
        };

        protected static readonly ExpressionTreeFixture ExpressionTreeFixture = new ExpressionTreeFixture();

        // primitives
        protected static readonly sbyte SByteInput = ExpressionTreeFixture.Create<sbyte>();
        protected static readonly short ShortInput = ExpressionTreeFixture.Create<short>();
        protected static readonly int IntInput = ExpressionTreeFixture.Create<int>();
        protected static readonly long LongInput = ExpressionTreeFixture.Create<long>();
        protected static readonly byte ByteInput = ExpressionTreeFixture.Create<byte>();
        protected static readonly ushort UShortInput = ExpressionTreeFixture.Create<ushort>();
        protected static readonly uint UIntInput = ExpressionTreeFixture.Create<uint>();
        protected static readonly ulong ULongInput = ExpressionTreeFixture.Create<ulong>();
        protected static readonly bool BoolInput = ExpressionTreeFixture.Create<bool>();
        protected static readonly string StringInput = ExpressionTreeFixture.Create<string>();
        protected static readonly char CharInput = ExpressionTreeFixture.Create<char>();
        protected static readonly DateTime DateTimeInput = ExpressionTreeFixture.Create<DateTime>();
        protected static readonly Guid GuidInput = ExpressionTreeFixture.Create<Guid>();
        protected static readonly byte[] BytesInput = ExpressionTreeFixture.Create<byte[]>();

        // models
        protected static readonly Benchmark.Models.AccessToken AccessTokenInput = ExpressionTreeFixture.Create<Benchmark.Models.AccessToken>();

        protected static readonly Benchmark.Models.AccountMerge AccountMergeInput = ExpressionTreeFixture.Create<Benchmark.Models.AccountMerge>();

        protected static readonly Benchmark.Models.Answer AnswerInput = ExpressionTreeFixture.Create<Benchmark.Models.Answer>();

        protected static readonly Benchmark.Models.Badge BadgeInput = ExpressionTreeFixture.Create<Benchmark.Models.Badge>();

        protected static readonly Benchmark.Models.Comment CommentInput = ExpressionTreeFixture.Create<Benchmark.Models.Comment>();

        protected static readonly Benchmark.Models.Error ErrorInput = ExpressionTreeFixture.Create<Benchmark.Models.Error>();

        protected static readonly Benchmark.Models.Event EventInput = ExpressionTreeFixture.Create<Benchmark.Models.Event>();

        protected static readonly Benchmark.Models.MobileFeed MobileFeedInput = ExpressionTreeFixture.Create<Benchmark.Models.MobileFeed>();

        protected static readonly Benchmark.Models.MobileQuestion MobileQuestionInput = ExpressionTreeFixture.Create<Benchmark.Models.MobileQuestion>();

        protected static readonly Benchmark.Models.MobileRepChange MobileRepChangeInput = ExpressionTreeFixture.Create<Benchmark.Models.MobileRepChange>();

        protected static readonly Benchmark.Models.MobileInboxItem MobileInboxItemInput = ExpressionTreeFixture.Create<Benchmark.Models.MobileInboxItem>();

        protected static readonly Benchmark.Models.MobileBadgeAward MobileBadgeAwardInput = ExpressionTreeFixture.Create<Benchmark.Models.MobileBadgeAward>();

        protected static readonly Benchmark.Models.MobilePrivilege MobilePrivilegeInput = ExpressionTreeFixture.Create<Benchmark.Models.MobilePrivilege>();

        protected static readonly Benchmark.Models.MobileCommunityBulletin MobileCommunityBulletinInput = ExpressionTreeFixture.Create<Benchmark.Models.MobileCommunityBulletin>();

        protected static readonly Benchmark.Models.MobileAssociationBonus MobileAssociationBonusInput = ExpressionTreeFixture.Create<Benchmark.Models.MobileAssociationBonus>();

        protected static readonly Benchmark.Models.MobileCareersJobAd MobileCareersJobAdInput = ExpressionTreeFixture.Create<Benchmark.Models.MobileCareersJobAd>();

        protected static readonly Benchmark.Models.MobileBannerAd MobileBannerAdInput = ExpressionTreeFixture.Create<Benchmark.Models.MobileBannerAd>();

        protected static readonly Benchmark.Models.MobileUpdateNotice MobileUpdateNoticeInput = ExpressionTreeFixture.Create<Benchmark.Models.MobileUpdateNotice>();

        protected static readonly Benchmark.Models.FlagOption FlagOptionInput = ExpressionTreeFixture.Create<Benchmark.Models.FlagOption>();

        protected static readonly Benchmark.Models.InboxItem InboxItemInput = ExpressionTreeFixture.Create<Benchmark.Models.InboxItem>();

        protected static readonly Benchmark.Models.Info InfoInput = ExpressionTreeFixture.Create<Benchmark.Models.Info>();

        protected static readonly Benchmark.Models.NetworkUser NetworkUserInput = ExpressionTreeFixture.Create<Benchmark.Models.NetworkUser>();

        protected static readonly Benchmark.Models.Notification NotificationInput = ExpressionTreeFixture.Create<Benchmark.Models.Notification>();

        protected static readonly Benchmark.Models.Post PostInput = ExpressionTreeFixture.Create<Benchmark.Models.Post>();

        protected static readonly Benchmark.Models.Privilege PrivilegeInput = ExpressionTreeFixture.Create<Benchmark.Models.Privilege>();

        protected static readonly Benchmark.Models.Question QuestionInput = ExpressionTreeFixture.Create<Benchmark.Models.Question>();

        protected static readonly Benchmark.Models.QuestionTimeline QuestionTimelineInput = ExpressionTreeFixture.Create<Benchmark.Models.QuestionTimeline>();

        protected static readonly Benchmark.Models.Reputation ReputationInput = ExpressionTreeFixture.Create<Benchmark.Models.Reputation>();

        protected static readonly Benchmark.Models.ReputationHistory ReputationHistoryInput = ExpressionTreeFixture.Create<Benchmark.Models.ReputationHistory>();

        protected static readonly Benchmark.Models.Revision RevisionInput = ExpressionTreeFixture.Create<Benchmark.Models.Revision>();

        protected static readonly Benchmark.Models.SearchExcerpt SearchExcerptInput = ExpressionTreeFixture.Create<Benchmark.Models.SearchExcerpt>();

        protected static readonly Benchmark.Models.ShallowUser ShallowUserInput = ExpressionTreeFixture.Create<Benchmark.Models.ShallowUser>();

        protected static readonly Benchmark.Models.SuggestedEdit SuggestedEditInput = ExpressionTreeFixture.Create<Benchmark.Models.SuggestedEdit>();

        protected static readonly Benchmark.Models.Tag TagInput = ExpressionTreeFixture.Create<Benchmark.Models.Tag>();

        protected static readonly Benchmark.Models.TagScore TagScoreInput = ExpressionTreeFixture.Create<Benchmark.Models.TagScore>();

        protected static readonly Benchmark.Models.TagSynonym TagSynonymInput = ExpressionTreeFixture.Create<Benchmark.Models.TagSynonym>();

        protected static readonly Benchmark.Models.TagWiki TagWikiInput = ExpressionTreeFixture.Create<Benchmark.Models.TagWiki>();

        protected static readonly Benchmark.Models.TopTag TopTagInput = ExpressionTreeFixture.Create<Benchmark.Models.TopTag>();

        protected static readonly Benchmark.Models.User UserInput = ExpressionTreeFixture.Create<Benchmark.Models.User>();

        protected static readonly Benchmark.Models.UserTimeline UserTimelineInput = ExpressionTreeFixture.Create<Benchmark.Models.UserTimeline>();

        protected static readonly Benchmark.Models.WritePermission WritePermissionInput = ExpressionTreeFixture.Create<Benchmark.Models.WritePermission>();

        protected static readonly Benchmark.Models.MobileBannerAd.MobileBannerAdImage MobileBannerAdImageInput = ExpressionTreeFixture.Create<Benchmark.Models.MobileBannerAd.MobileBannerAdImage>();

        protected static readonly Benchmark.Models.Info.Site SiteInput = ExpressionTreeFixture.Create<Benchmark.Models.Info.Site>();

        protected static readonly Benchmark.Models.Info.RelatedSite RelatedSiteInput = ExpressionTreeFixture.Create<Benchmark.Models.Info.RelatedSite>();

        protected static readonly Benchmark.Models.Question.ClosedDetails ClosedDetailsInput = ExpressionTreeFixture.Create<Benchmark.Models.Question.ClosedDetails>();

        protected static readonly Benchmark.Models.Question.Notice NoticeInput = ExpressionTreeFixture.Create<Benchmark.Models.Question.Notice>();

        protected static readonly Benchmark.Models.Question.MigrationInfo MigrationInfoInput = ExpressionTreeFixture.Create<Benchmark.Models.Question.MigrationInfo>();

        protected static readonly Benchmark.Models.User.BadgeCount BadgeCountInput = ExpressionTreeFixture.Create<Benchmark.Models.User.BadgeCount>();

        protected static readonly Benchmark.Models.Info.Site.Styling StylingInput = ExpressionTreeFixture.Create<Benchmark.Models.Info.Site.Styling>();

        protected static readonly Benchmark.Models.Question.ClosedDetails.OriginalQuestion OriginalQuestionInput = ExpressionTreeFixture.Create<Benchmark.Models.Question.ClosedDetails.OriginalQuestion>();

        private object SByteOutput;
        private object ShortOutput;
        private object IntOutput;
        private object LongOutput;
        private object ByteOutput;
        private object UShortOutput;
        private object UIntOutput;
        private object ULongOutput;
        private object BoolOutput;
        private object StringOutput;
        private object CharOutput;
        private object DateTimeOutput;
        private object GuidOutput;
        private object BytesOutput;

        private object AccessTokenOutput;
        private object AccountMergeOutput;
        private object AnswerOutput;
        private object BadgeOutput;
        private object CommentOutput;
        private object ErrorOutput;
        private object EventOutput;
        private object MobileFeedOutput;
        private object MobileQuestionOutput;
        private object MobileRepChangeOutput;
        private object MobileInboxItemOutput;
        private object MobileBadgeAwardOutput;
        private object MobilePrivilegeOutput;
        private object MobileCommunityBulletinOutput;
        private object MobileAssociationBonusOutput;
        private object MobileCareersJobAdOutput;
        private object MobileBannerAdOutput;
        private object MobileUpdateNoticeOutput;
        private object FlagOptionOutput;
        private object InboxItemOutput;
        private object InfoOutput;
        private object NetworkUserOutput;
        private object NotificationOutput;
        private object PostOutput;
        private object PrivilegeOutput;
        private object QuestionOutput;
        private object QuestionTimelineOutput;
        private object ReputationOutput;
        private object ReputationHistoryOutput;
        private object RevisionOutput;
        private object SearchExcerptOutput;
        private object ShallowUserOutput;
        private object SuggestedEditOutput;
        private object TagOutput;
        private object TagScoreOutput;
        private object TagSynonymOutput;
        private object TagWikiOutput;
        private object TopTagOutput;
        private object UserOutput;
        private object UserTimelineOutput;
        private object WritePermissionOutput;
        private object MobileBannerAdImageOutput;
        private object SiteOutput;
        private object RelatedSiteOutput;
        private object ClosedDetailsOutput;
        private object NoticeOutput;
        private object MigrationInfoOutput;
        private object BadgeCountOutput;
        private object StylingOutput;
        private object OriginalQuestionOutput;

        [GlobalSetup]
        public void Setup()
        {
            // primitives
            this.SByteOutput = this.Serializer.Serialize(SByteInput);
            this.ShortOutput = this.Serializer.Serialize(ShortInput);
            this.IntOutput = this.Serializer.Serialize(IntInput);
            this.LongOutput = this.Serializer.Serialize(LongInput);
            this.ByteOutput = this.Serializer.Serialize(ByteInput);
            this.UShortOutput = this.Serializer.Serialize(UShortInput);
            this.UIntOutput = this.Serializer.Serialize(UIntInput);
            this.ULongOutput = this.Serializer.Serialize(ULongInput);
            this.BoolOutput = this.Serializer.Serialize(BoolInput);
            this.StringOutput = this.Serializer.Serialize(StringInput);
            this.CharOutput = this.Serializer.Serialize(CharInput);
            this.DateTimeOutput = this.Serializer.Serialize(DateTimeInput);
            this.GuidOutput = this.Serializer.Serialize(GuidInput);
            this.BytesOutput = this.Serializer.Serialize(BytesInput);

            // models
            this.AccessTokenOutput = this.Serializer.Serialize(AccessTokenInput);
            this.AccountMergeOutput = this.Serializer.Serialize(AccountMergeInput);
            this.AnswerOutput = this.Serializer.Serialize(AnswerInput);
            this.BadgeOutput = this.Serializer.Serialize(BadgeInput);
            this.CommentOutput = this.Serializer.Serialize(CommentInput);
            this.ErrorOutput = this.Serializer.Serialize(ErrorInput);
            this.EventOutput = this.Serializer.Serialize(EventInput);
            this.MobileFeedOutput = this.Serializer.Serialize(MobileFeedInput);
            this.MobileQuestionOutput = this.Serializer.Serialize(MobileQuestionInput);
            this.MobileRepChangeOutput = this.Serializer.Serialize(MobileRepChangeInput);
            this.MobileInboxItemOutput = this.Serializer.Serialize(MobileInboxItemInput);
            this.MobileBadgeAwardOutput = this.Serializer.Serialize(MobileBadgeAwardInput);
            this.MobilePrivilegeOutput = this.Serializer.Serialize(MobilePrivilegeInput);
            this.MobileCommunityBulletinOutput = this.Serializer.Serialize(MobileCommunityBulletinInput);
            this.MobileAssociationBonusOutput = this.Serializer.Serialize(MobileAssociationBonusInput);
            this.MobileCareersJobAdOutput = this.Serializer.Serialize(MobileCareersJobAdInput);
            this.MobileBannerAdOutput = this.Serializer.Serialize(MobileBannerAdInput);
            this.MobileUpdateNoticeOutput = this.Serializer.Serialize(MobileUpdateNoticeInput);
            this.FlagOptionOutput = this.Serializer.Serialize(FlagOptionInput);
            this.InboxItemOutput = this.Serializer.Serialize(InboxItemInput);
            this.InfoOutput = this.Serializer.Serialize(InfoInput);
            this.NetworkUserOutput = this.Serializer.Serialize(NetworkUserInput);
            this.NotificationOutput = this.Serializer.Serialize(NotificationInput);
            this.PostOutput = this.Serializer.Serialize(PostInput);
            this.PrivilegeOutput = this.Serializer.Serialize(PrivilegeInput);
            this.QuestionOutput = this.Serializer.Serialize(QuestionInput);
            this.QuestionTimelineOutput = this.Serializer.Serialize(QuestionTimelineInput);
            this.ReputationOutput = this.Serializer.Serialize(ReputationInput);
            this.ReputationHistoryOutput = this.Serializer.Serialize(ReputationHistoryInput);
            this.RevisionOutput = this.Serializer.Serialize(RevisionInput);
            this.SearchExcerptOutput = this.Serializer.Serialize(SearchExcerptInput);
            this.ShallowUserOutput = this.Serializer.Serialize(ShallowUserInput);
            this.SuggestedEditOutput = this.Serializer.Serialize(SuggestedEditInput);
            this.TagOutput = this.Serializer.Serialize(TagInput);
            this.TagScoreOutput = this.Serializer.Serialize(TagScoreInput);
            this.TagSynonymOutput = this.Serializer.Serialize(TagSynonymInput);
            this.TagWikiOutput = this.Serializer.Serialize(TagWikiInput);
            this.TopTagOutput = this.Serializer.Serialize(TopTagInput);
            this.UserOutput = this.Serializer.Serialize(UserInput);
            this.UserTimelineOutput = this.Serializer.Serialize(UserTimelineInput);
            this.WritePermissionOutput = this.Serializer.Serialize(WritePermissionInput);
            this.MobileBannerAdImageOutput = this.Serializer.Serialize(MobileBannerAdImageInput);
            this.SiteOutput = this.Serializer.Serialize(SiteInput);
            this.RelatedSiteOutput = this.Serializer.Serialize(RelatedSiteInput);
            this.ClosedDetailsOutput = this.Serializer.Serialize(ClosedDetailsInput);
            this.NoticeOutput = this.Serializer.Serialize(NoticeInput);
            this.MigrationInfoOutput = this.Serializer.Serialize(MigrationInfoInput);
            this.BadgeCountOutput = this.Serializer.Serialize(BadgeCountInput);
            this.StylingOutput = this.Serializer.Serialize(StylingInput);
            this.OriginalQuestionOutput = this.Serializer.Serialize(OriginalQuestionInput);
        }

        // Serialize
        [Benchmark] public object _PrimitiveSByteSerialize() => this.Serializer.Serialize(SByteInput);

        [Benchmark] public object _PrimitiveShortSerialize() => this.Serializer.Serialize(ShortInput);

        [Benchmark] public object _PrimitiveIntSerialize() => this.Serializer.Serialize(IntInput);

        [Benchmark] public object _PrimitiveLongSerialize() => this.Serializer.Serialize(LongInput);

        [Benchmark] public object _PrimitiveByteSerialize() => this.Serializer.Serialize(ByteInput);

        [Benchmark] public object _PrimitiveUShortSerialize() => this.Serializer.Serialize(UShortInput);

        [Benchmark] public object _PrimitiveUIntSerialize() => this.Serializer.Serialize(UIntInput);

        [Benchmark] public object _PrimitiveULongSerialize() => this.Serializer.Serialize(ULongInput);

        [Benchmark] public object _PrimitiveBoolSerialize() => this.Serializer.Serialize(BoolInput);

        [Benchmark] public object _PrimitiveStringSerialize() => this.Serializer.Serialize(StringInput);

        [Benchmark] public object _PrimitiveCharSerialize() => this.Serializer.Serialize(CharInput);

        [Benchmark] public object _PrimitiveDateTimeSerialize() => this.Serializer.Serialize(DateTimeInput);

        [Benchmark] public object _PrimitiveGuidSerialize() => this.Serializer.Serialize(GuidInput);

        [Benchmark] public object _PrimitiveBytesSerialize() => this.Serializer.Serialize(BytesInput);

        [Benchmark] public object AccessTokenSerialize() => this.Serializer.Serialize(AccessTokenInput);

        [Benchmark] public object AccountMergeSerialize() => this.Serializer.Serialize(AccountMergeInput);

        [Benchmark] public object AnswerSerialize() => this.Serializer.Serialize(AnswerInput);

        [Benchmark] public object BadgeSerialize() => this.Serializer.Serialize(BadgeInput);

        [Benchmark] public object CommentSerialize() => this.Serializer.Serialize(CommentInput);

        [Benchmark] public object ErrorSerialize() => this.Serializer.Serialize(ErrorInput);

        [Benchmark] public object EventSerialize() => this.Serializer.Serialize(EventInput);

        [Benchmark] public object MobileFeedSerialize() => this.Serializer.Serialize(MobileFeedInput);

        [Benchmark] public object MobileQuestionSerialize() => this.Serializer.Serialize(MobileQuestionInput);

        [Benchmark] public object MobileRepChangeSerialize() => this.Serializer.Serialize(MobileRepChangeInput);

        [Benchmark] public object MobileInboxItemSerialize() => this.Serializer.Serialize(MobileInboxItemInput);

        [Benchmark] public object MobileBadgeAwardSerialize() => this.Serializer.Serialize(MobileBadgeAwardInput);

        [Benchmark] public object MobilePrivilegeSerialize() => this.Serializer.Serialize(MobilePrivilegeInput);

        [Benchmark] public object MobileCommunityBulletinSerialize() => this.Serializer.Serialize(MobileCommunityBulletinInput);

        [Benchmark] public object MobileAssociationBonusSerialize() => this.Serializer.Serialize(MobileAssociationBonusInput);

        [Benchmark] public object MobileCareersJobAdSerialize() => this.Serializer.Serialize(MobileCareersJobAdInput);

        [Benchmark] public object MobileBannerAdSerialize() => this.Serializer.Serialize(MobileBannerAdInput);

        [Benchmark] public object MobileUpdateNoticeSerialize() => this.Serializer.Serialize(MobileUpdateNoticeInput);

        [Benchmark] public object FlagOptionSerialize() => this.Serializer.Serialize(FlagOptionInput);

        [Benchmark] public object InboxItemSerialize() => this.Serializer.Serialize(InboxItemInput);

        [Benchmark] public object InfoSerialize() => this.Serializer.Serialize(InfoInput);

        [Benchmark] public object NetworkUserSerialize() => this.Serializer.Serialize(NetworkUserInput);

        [Benchmark] public object NotificationSerialize() => this.Serializer.Serialize(NotificationInput);

        [Benchmark] public object PostSerialize() => this.Serializer.Serialize(PostInput);

        [Benchmark] public object PrivilegeSerialize() => this.Serializer.Serialize(PrivilegeInput);

        [Benchmark] public object QuestionSerialize() => this.Serializer.Serialize(QuestionInput);

        [Benchmark] public object QuestionTimelineSerialize() => this.Serializer.Serialize(QuestionTimelineInput);

        [Benchmark] public object ReputationSerialize() => this.Serializer.Serialize(ReputationInput);

        [Benchmark] public object ReputationHistorySerialize() => this.Serializer.Serialize(ReputationHistoryInput);

        [Benchmark] public object RevisionSerialize() => this.Serializer.Serialize(RevisionInput);

        [Benchmark] public object SearchExcerptSerialize() => this.Serializer.Serialize(SearchExcerptInput);

        [Benchmark] public object ShallowUserSerialize() => this.Serializer.Serialize(ShallowUserInput);

        [Benchmark] public object SuggestedEditSerialize() => this.Serializer.Serialize(SuggestedEditInput);

        [Benchmark] public object TagSerialize() => this.Serializer.Serialize(TagInput);

        [Benchmark] public object TagScoreSerialize() => this.Serializer.Serialize(TagScoreInput);

        [Benchmark] public object TagSynonymSerialize() => this.Serializer.Serialize(TagSynonymInput);

        [Benchmark] public object TagWikiSerialize() => this.Serializer.Serialize(TagWikiInput);

        [Benchmark] public object TopTagSerialize() => this.Serializer.Serialize(TopTagInput);

        [Benchmark] public object UserSerialize() => this.Serializer.Serialize(UserInput);

        [Benchmark] public object UserTimelineSerialize() => this.Serializer.Serialize(UserTimelineInput);

        [Benchmark] public object WritePermissionSerialize() => this.Serializer.Serialize(WritePermissionInput);

        [Benchmark] public object MobileBannerAdImageSerialize() => this.Serializer.Serialize(MobileBannerAdImageInput);

        [Benchmark] public object SiteSerialize() => this.Serializer.Serialize(SiteInput);

        [Benchmark] public object RelatedSiteSerialize() => this.Serializer.Serialize(RelatedSiteInput);

        [Benchmark] public object ClosedDetailsSerialize() => this.Serializer.Serialize(ClosedDetailsInput);

        [Benchmark] public object NoticeSerialize() => this.Serializer.Serialize(NoticeInput);

        [Benchmark] public object MigrationInfoSerialize() => this.Serializer.Serialize(MigrationInfoInput);

        [Benchmark] public object BadgeCountSerialize() => this.Serializer.Serialize(BadgeCountInput);

        [Benchmark] public object StylingSerialize() => this.Serializer.Serialize(StylingInput);

        [Benchmark] public object OriginalQuestionSerialize() => this.Serializer.Serialize(OriginalQuestionInput);

        // Deserialize
        [Benchmark] public SByte _PrimitiveSByteDeserialize() => this.Serializer.Deserialize<SByte>(this.SByteOutput);

        [Benchmark] public short _PrimitiveShortDeserialize() => this.Serializer.Deserialize<short>(this.ShortOutput);

        [Benchmark] public Int32 _PrimitiveIntDeserialize() => this.Serializer.Deserialize<Int32>(this.IntOutput);

        [Benchmark] public Int64 _PrimitiveLongDeserialize() => this.Serializer.Deserialize<Int64>(this.LongOutput);

        [Benchmark] public Byte _PrimitiveByteDeserialize() => this.Serializer.Deserialize<Byte>(this.ByteOutput);

        [Benchmark] public ushort _PrimitiveUShortDeserialize() => this.Serializer.Deserialize<ushort>(this.UShortOutput);

        [Benchmark] public uint _PrimitiveUIntDeserialize() => this.Serializer.Deserialize<uint>(this.UIntOutput);

        [Benchmark] public ulong _PrimitiveULongDeserialize() => this.Serializer.Deserialize<ulong>(this.ULongOutput);

        [Benchmark] public bool _PrimitiveBoolDeserialize() => this.Serializer.Deserialize<bool>(this.BoolOutput);

        [Benchmark] public String _PrimitiveStringDeserialize() => this.Serializer.Deserialize<String>(this.StringOutput);

        [Benchmark] public Char _PrimitiveCharDeserialize() => this.Serializer.Deserialize<Char>(this.CharOutput);

        [Benchmark] public DateTime _PrimitiveDateTimeDeserialize() => this.Serializer.Deserialize<DateTime>(this.DateTimeOutput);

        [Benchmark] public Guid _PrimitiveGuidDeserialize() => this.Serializer.Deserialize<Guid>(this.GuidOutput);

        [Benchmark] public byte[] _PrimitiveBytesDeserialize() => this.Serializer.Deserialize<byte[]>(this.BytesOutput);

        [Benchmark] public AccessToken AccessTokenDeserialize() => this.Serializer.Deserialize<AccessToken>(this.AccessTokenOutput);

        [Benchmark] public AccountMerge AccountMergeDeserialize() => this.Serializer.Deserialize<AccountMerge>(this.AccountMergeOutput);

        [Benchmark] public Answer AnswerDeserialize() => this.Serializer.Deserialize<Answer>(this.AnswerOutput);

        [Benchmark] public Badge BadgeDeserialize() => this.Serializer.Deserialize<Badge>(this.BadgeOutput);

        [Benchmark] public Comment CommentDeserialize() => this.Serializer.Deserialize<Comment>(this.CommentOutput);

        [Benchmark] public Error ErrorDeserialize() => this.Serializer.Deserialize<Error>(this.ErrorOutput);

        [Benchmark] public Event EventDeserialize() => this.Serializer.Deserialize<Event>(this.EventOutput);

        [Benchmark] public MobileFeed MobileFeedDeserialize() => this.Serializer.Deserialize<MobileFeed>(this.MobileFeedOutput);

        [Benchmark] public MobileQuestion MobileQuestionDeserialize() => this.Serializer.Deserialize<MobileQuestion>(this.MobileQuestionOutput);

        [Benchmark] public MobileRepChange MobileRepChangeDeserialize() => this.Serializer.Deserialize<MobileRepChange>(this.MobileRepChangeOutput);

        [Benchmark] public MobileInboxItem MobileInboxItemDeserialize() => this.Serializer.Deserialize<MobileInboxItem>(this.MobileInboxItemOutput);

        [Benchmark] public MobileBadgeAward MobileBadgeAwardDeserialize() => this.Serializer.Deserialize<MobileBadgeAward>(this.MobileBadgeAwardOutput);

        [Benchmark] public MobilePrivilege MobilePrivilegeDeserialize() => this.Serializer.Deserialize<MobilePrivilege>(this.MobilePrivilegeOutput);

        [Benchmark] public MobileCommunityBulletin MobileCommunityBulletinDeserialize() => this.Serializer.Deserialize<MobileCommunityBulletin>(this.MobileCommunityBulletinOutput);

        [Benchmark] public MobileAssociationBonus MobileAssociationBonusDeserialize() => this.Serializer.Deserialize<MobileAssociationBonus>(this.MobileAssociationBonusOutput);

        [Benchmark] public MobileCareersJobAd MobileCareersJobAdDeserialize() => this.Serializer.Deserialize<MobileCareersJobAd>(this.MobileCareersJobAdOutput);

        [Benchmark] public MobileBannerAd MobileBannerAdDeserialize() => this.Serializer.Deserialize<MobileBannerAd>(this.MobileBannerAdOutput);

        [Benchmark] public MobileUpdateNotice MobileUpdateNoticeDeserialize() => this.Serializer.Deserialize<MobileUpdateNotice>(this.MobileUpdateNoticeOutput);

        [Benchmark] public FlagOption FlagOptionDeserialize() => this.Serializer.Deserialize<FlagOption>(this.FlagOptionOutput);

        [Benchmark] public InboxItem InboxItemDeserialize() => this.Serializer.Deserialize<InboxItem>(this.InboxItemOutput);

        [Benchmark] public Info InfoDeserialize() => this.Serializer.Deserialize<Info>(this.InfoOutput);

        [Benchmark] public NetworkUser NetworkUserDeserialize() => this.Serializer.Deserialize<NetworkUser>(this.NetworkUserOutput);

        [Benchmark] public Notification NotificationDeserialize() => this.Serializer.Deserialize<Notification>(this.NotificationOutput);

        [Benchmark] public Post PostDeserialize() => this.Serializer.Deserialize<Post>(this.PostOutput);

        [Benchmark] public Privilege PrivilegeDeserialize() => this.Serializer.Deserialize<Privilege>(this.PrivilegeOutput);

        [Benchmark] public Question QuestionDeserialize() => this.Serializer.Deserialize<Question>(this.QuestionOutput);

        [Benchmark] public QuestionTimeline QuestionTimelineDeserialize() => this.Serializer.Deserialize<QuestionTimeline>(this.QuestionTimelineOutput);

        [Benchmark] public Reputation ReputationDeserialize() => this.Serializer.Deserialize<Reputation>(this.ReputationOutput);

        [Benchmark] public ReputationHistory ReputationHistoryDeserialize() => this.Serializer.Deserialize<ReputationHistory>(this.ReputationHistoryOutput);

        [Benchmark] public Revision RevisionDeserialize() => this.Serializer.Deserialize<Revision>(this.RevisionOutput);

        [Benchmark] public SearchExcerpt SearchExcerptDeserialize() => this.Serializer.Deserialize<SearchExcerpt>(this.SearchExcerptOutput);

        [Benchmark] public ShallowUser ShallowUserDeserialize() => this.Serializer.Deserialize<ShallowUser>(this.ShallowUserOutput);

        [Benchmark] public SuggestedEdit SuggestedEditDeserialize() => this.Serializer.Deserialize<SuggestedEdit>(this.SuggestedEditOutput);

        [Benchmark] public Tag TagDeserialize() => this.Serializer.Deserialize<Tag>(this.TagOutput);

        [Benchmark] public TagScore TagScoreDeserialize() => this.Serializer.Deserialize<TagScore>(this.TagScoreOutput);

        [Benchmark] public TagSynonym TagSynonymDeserialize() => this.Serializer.Deserialize<TagSynonym>(this.TagSynonymOutput);

        [Benchmark] public TagWiki TagWikiDeserialize() => this.Serializer.Deserialize<TagWiki>(this.TagWikiOutput);

        [Benchmark] public TopTag TopTagDeserialize() => this.Serializer.Deserialize<TopTag>(this.TopTagOutput);

        [Benchmark] public User UserDeserialize() => this.Serializer.Deserialize<User>(this.UserOutput);

        [Benchmark] public UserTimeline UserTimelineDeserialize() => this.Serializer.Deserialize<UserTimeline>(this.UserTimelineOutput);

        [Benchmark] public WritePermission WritePermissionDeserialize() => this.Serializer.Deserialize<WritePermission>(this.WritePermissionOutput);

        [Benchmark] public MobileBannerAd.MobileBannerAdImage MobileBannerAdImageDeserialize() => this.Serializer.Deserialize<MobileBannerAd.MobileBannerAdImage>(this.MobileBannerAdImageOutput);

        [Benchmark] public Info.Site SiteDeserialize() => this.Serializer.Deserialize<Info.Site>(this.SiteOutput);

        [Benchmark] public Info.RelatedSite RelatedSiteDeserialize() => this.Serializer.Deserialize<Info.RelatedSite>(this.RelatedSiteOutput);

        [Benchmark] public Question.ClosedDetails ClosedDetailsDeserialize() => this.Serializer.Deserialize<Question.ClosedDetails>(this.ClosedDetailsOutput);

        [Benchmark] public Question.Notice NoticeDeserialize() => this.Serializer.Deserialize<Question.Notice>(this.NoticeOutput);

        [Benchmark] public Question.MigrationInfo MigrationInfoDeserialize() => this.Serializer.Deserialize<Question.MigrationInfo>(this.MigrationInfoOutput);

        [Benchmark] public User.BadgeCount BadgeCountDeserialize() => this.Serializer.Deserialize<User.BadgeCount>(this.BadgeCountOutput);

        [Benchmark] public Info.Site.Styling StylingDeserialize() => this.Serializer.Deserialize<Info.Site.Styling>(this.StylingOutput);

        [Benchmark] public Question.ClosedDetails.OriginalQuestion OriginalQuestionDeserialize() => this.Serializer.Deserialize<Question.ClosedDetails.OriginalQuestion>(this.OriginalQuestionOutput);
    }

    [Config(typeof(BenchmarkConfig))]
    public class MsgPackV1_Vs_MsgPackV2_BytesInOut // : AllSerializerBenchmark
    {
        [ParamsSource(nameof(Serializers))]
        public SerializerBase Serializer;

        // Currently BenchmarkDotNet does not detect inherited ParamsSource so use copy and paste:)
        public IEnumerable<SerializerBase> Serializers => new SerializerBase[]
        {
            new MessagePack_v1(),
            new MessagePack_v2(),
        };

        protected static readonly ExpressionTreeFixture ExpressionTreeFixture = new ExpressionTreeFixture();

        // primitives
        protected static readonly sbyte SByteInput = ExpressionTreeFixture.Create<sbyte>();
        protected static readonly short ShortInput = ExpressionTreeFixture.Create<short>();
        protected static readonly int IntInput = ExpressionTreeFixture.Create<int>();
        protected static readonly long LongInput = ExpressionTreeFixture.Create<long>();
        protected static readonly byte ByteInput = ExpressionTreeFixture.Create<byte>();
        protected static readonly ushort UShortInput = ExpressionTreeFixture.Create<ushort>();
        protected static readonly uint UIntInput = ExpressionTreeFixture.Create<uint>();
        protected static readonly ulong ULongInput = ExpressionTreeFixture.Create<ulong>();
        protected static readonly bool BoolInput = ExpressionTreeFixture.Create<bool>();
        protected static readonly string StringInput = ExpressionTreeFixture.Create<string>();
        protected static readonly char CharInput = ExpressionTreeFixture.Create<char>();
        protected static readonly DateTime DateTimeInput = ExpressionTreeFixture.Create<DateTime>();
        protected static readonly Guid GuidInput = ExpressionTreeFixture.Create<Guid>();
        protected static readonly byte[] BytesInput = ExpressionTreeFixture.Create<byte[]>();

        // models
        protected static readonly Benchmark.Models.AccessToken AccessTokenInput = ExpressionTreeFixture.Create<Benchmark.Models.AccessToken>();

        protected static readonly Benchmark.Models.AccountMerge AccountMergeInput = ExpressionTreeFixture.Create<Benchmark.Models.AccountMerge>();

        protected static readonly Benchmark.Models.Answer AnswerInput = ExpressionTreeFixture.Create<Benchmark.Models.Answer>();

        protected static readonly Benchmark.Models.Badge BadgeInput = ExpressionTreeFixture.Create<Benchmark.Models.Badge>();

        protected static readonly Benchmark.Models.Comment CommentInput = ExpressionTreeFixture.Create<Benchmark.Models.Comment>();

        protected static readonly Benchmark.Models.Error ErrorInput = ExpressionTreeFixture.Create<Benchmark.Models.Error>();

        protected static readonly Benchmark.Models.Event EventInput = ExpressionTreeFixture.Create<Benchmark.Models.Event>();

        protected static readonly Benchmark.Models.MobileFeed MobileFeedInput = ExpressionTreeFixture.Create<Benchmark.Models.MobileFeed>();

        protected static readonly Benchmark.Models.MobileQuestion MobileQuestionInput = ExpressionTreeFixture.Create<Benchmark.Models.MobileQuestion>();

        protected static readonly Benchmark.Models.MobileRepChange MobileRepChangeInput = ExpressionTreeFixture.Create<Benchmark.Models.MobileRepChange>();

        protected static readonly Benchmark.Models.MobileInboxItem MobileInboxItemInput = ExpressionTreeFixture.Create<Benchmark.Models.MobileInboxItem>();

        protected static readonly Benchmark.Models.MobileBadgeAward MobileBadgeAwardInput = ExpressionTreeFixture.Create<Benchmark.Models.MobileBadgeAward>();

        protected static readonly Benchmark.Models.MobilePrivilege MobilePrivilegeInput = ExpressionTreeFixture.Create<Benchmark.Models.MobilePrivilege>();

        protected static readonly Benchmark.Models.MobileCommunityBulletin MobileCommunityBulletinInput = ExpressionTreeFixture.Create<Benchmark.Models.MobileCommunityBulletin>();

        protected static readonly Benchmark.Models.MobileAssociationBonus MobileAssociationBonusInput = ExpressionTreeFixture.Create<Benchmark.Models.MobileAssociationBonus>();

        protected static readonly Benchmark.Models.MobileCareersJobAd MobileCareersJobAdInput = ExpressionTreeFixture.Create<Benchmark.Models.MobileCareersJobAd>();

        protected static readonly Benchmark.Models.MobileBannerAd MobileBannerAdInput = ExpressionTreeFixture.Create<Benchmark.Models.MobileBannerAd>();

        protected static readonly Benchmark.Models.MobileUpdateNotice MobileUpdateNoticeInput = ExpressionTreeFixture.Create<Benchmark.Models.MobileUpdateNotice>();

        protected static readonly Benchmark.Models.FlagOption FlagOptionInput = ExpressionTreeFixture.Create<Benchmark.Models.FlagOption>();

        protected static readonly Benchmark.Models.InboxItem InboxItemInput = ExpressionTreeFixture.Create<Benchmark.Models.InboxItem>();

        protected static readonly Benchmark.Models.Info InfoInput = ExpressionTreeFixture.Create<Benchmark.Models.Info>();

        protected static readonly Benchmark.Models.NetworkUser NetworkUserInput = ExpressionTreeFixture.Create<Benchmark.Models.NetworkUser>();

        protected static readonly Benchmark.Models.Notification NotificationInput = ExpressionTreeFixture.Create<Benchmark.Models.Notification>();

        protected static readonly Benchmark.Models.Post PostInput = ExpressionTreeFixture.Create<Benchmark.Models.Post>();

        protected static readonly Benchmark.Models.Privilege PrivilegeInput = ExpressionTreeFixture.Create<Benchmark.Models.Privilege>();

        protected static readonly Benchmark.Models.Question QuestionInput = ExpressionTreeFixture.Create<Benchmark.Models.Question>();

        protected static readonly Benchmark.Models.QuestionTimeline QuestionTimelineInput = ExpressionTreeFixture.Create<Benchmark.Models.QuestionTimeline>();

        protected static readonly Benchmark.Models.Reputation ReputationInput = ExpressionTreeFixture.Create<Benchmark.Models.Reputation>();

        protected static readonly Benchmark.Models.ReputationHistory ReputationHistoryInput = ExpressionTreeFixture.Create<Benchmark.Models.ReputationHistory>();

        protected static readonly Benchmark.Models.Revision RevisionInput = ExpressionTreeFixture.Create<Benchmark.Models.Revision>();

        protected static readonly Benchmark.Models.SearchExcerpt SearchExcerptInput = ExpressionTreeFixture.Create<Benchmark.Models.SearchExcerpt>();

        protected static readonly Benchmark.Models.ShallowUser ShallowUserInput = ExpressionTreeFixture.Create<Benchmark.Models.ShallowUser>();

        protected static readonly Benchmark.Models.SuggestedEdit SuggestedEditInput = ExpressionTreeFixture.Create<Benchmark.Models.SuggestedEdit>();

        protected static readonly Benchmark.Models.Tag TagInput = ExpressionTreeFixture.Create<Benchmark.Models.Tag>();

        protected static readonly Benchmark.Models.TagScore TagScoreInput = ExpressionTreeFixture.Create<Benchmark.Models.TagScore>();

        protected static readonly Benchmark.Models.TagSynonym TagSynonymInput = ExpressionTreeFixture.Create<Benchmark.Models.TagSynonym>();

        protected static readonly Benchmark.Models.TagWiki TagWikiInput = ExpressionTreeFixture.Create<Benchmark.Models.TagWiki>();

        protected static readonly Benchmark.Models.TopTag TopTagInput = ExpressionTreeFixture.Create<Benchmark.Models.TopTag>();

        protected static readonly Benchmark.Models.User UserInput = ExpressionTreeFixture.Create<Benchmark.Models.User>();

        protected static readonly Benchmark.Models.UserTimeline UserTimelineInput = ExpressionTreeFixture.Create<Benchmark.Models.UserTimeline>();

        protected static readonly Benchmark.Models.WritePermission WritePermissionInput = ExpressionTreeFixture.Create<Benchmark.Models.WritePermission>();

        protected static readonly Benchmark.Models.MobileBannerAd.MobileBannerAdImage MobileBannerAdImageInput = ExpressionTreeFixture.Create<Benchmark.Models.MobileBannerAd.MobileBannerAdImage>();

        protected static readonly Benchmark.Models.Info.Site SiteInput = ExpressionTreeFixture.Create<Benchmark.Models.Info.Site>();

        protected static readonly Benchmark.Models.Info.RelatedSite RelatedSiteInput = ExpressionTreeFixture.Create<Benchmark.Models.Info.RelatedSite>();

        protected static readonly Benchmark.Models.Question.ClosedDetails ClosedDetailsInput = ExpressionTreeFixture.Create<Benchmark.Models.Question.ClosedDetails>();

        protected static readonly Benchmark.Models.Question.Notice NoticeInput = ExpressionTreeFixture.Create<Benchmark.Models.Question.Notice>();

        protected static readonly Benchmark.Models.Question.MigrationInfo MigrationInfoInput = ExpressionTreeFixture.Create<Benchmark.Models.Question.MigrationInfo>();

        protected static readonly Benchmark.Models.User.BadgeCount BadgeCountInput = ExpressionTreeFixture.Create<Benchmark.Models.User.BadgeCount>();

        protected static readonly Benchmark.Models.Info.Site.Styling StylingInput = ExpressionTreeFixture.Create<Benchmark.Models.Info.Site.Styling>();

        protected static readonly Benchmark.Models.Question.ClosedDetails.OriginalQuestion OriginalQuestionInput = ExpressionTreeFixture.Create<Benchmark.Models.Question.ClosedDetails.OriginalQuestion>();

        private object SByteOutput;
        private object ShortOutput;
        private object IntOutput;
        private object LongOutput;
        private object ByteOutput;
        private object UShortOutput;
        private object UIntOutput;
        private object ULongOutput;
        private object BoolOutput;
        private object StringOutput;
        private object CharOutput;
        private object DateTimeOutput;
        private object GuidOutput;
        private object BytesOutput;

        private object AccessTokenOutput;
        private object AccountMergeOutput;
        private object AnswerOutput;
        private object BadgeOutput;
        private object CommentOutput;
        private object ErrorOutput;
        private object EventOutput;
        private object MobileFeedOutput;
        private object MobileQuestionOutput;
        private object MobileRepChangeOutput;
        private object MobileInboxItemOutput;
        private object MobileBadgeAwardOutput;
        private object MobilePrivilegeOutput;
        private object MobileCommunityBulletinOutput;
        private object MobileAssociationBonusOutput;
        private object MobileCareersJobAdOutput;
        private object MobileBannerAdOutput;
        private object MobileUpdateNoticeOutput;
        private object FlagOptionOutput;
        private object InboxItemOutput;
        private object InfoOutput;
        private object NetworkUserOutput;
        private object NotificationOutput;
        private object PostOutput;
        private object PrivilegeOutput;
        private object QuestionOutput;
        private object QuestionTimelineOutput;
        private object ReputationOutput;
        private object ReputationHistoryOutput;
        private object RevisionOutput;
        private object SearchExcerptOutput;
        private object ShallowUserOutput;
        private object SuggestedEditOutput;
        private object TagOutput;
        private object TagScoreOutput;
        private object TagSynonymOutput;
        private object TagWikiOutput;
        private object TopTagOutput;
        private object UserOutput;
        private object UserTimelineOutput;
        private object WritePermissionOutput;
        private object MobileBannerAdImageOutput;
        private object SiteOutput;
        private object RelatedSiteOutput;
        private object ClosedDetailsOutput;
        private object NoticeOutput;
        private object MigrationInfoOutput;
        private object BadgeCountOutput;
        private object StylingOutput;
        private object OriginalQuestionOutput;

        [GlobalSetup]
        public void Setup()
        {
            // primitives
            this.SByteOutput = this.Serializer.Serialize(SByteInput);
            this.ShortOutput = this.Serializer.Serialize(ShortInput);
            this.IntOutput = this.Serializer.Serialize(IntInput);
            this.LongOutput = this.Serializer.Serialize(LongInput);
            this.ByteOutput = this.Serializer.Serialize(ByteInput);
            this.UShortOutput = this.Serializer.Serialize(UShortInput);
            this.UIntOutput = this.Serializer.Serialize(UIntInput);
            this.ULongOutput = this.Serializer.Serialize(ULongInput);
            this.BoolOutput = this.Serializer.Serialize(BoolInput);
            this.StringOutput = this.Serializer.Serialize(StringInput);
            this.CharOutput = this.Serializer.Serialize(CharInput);
            this.DateTimeOutput = this.Serializer.Serialize(DateTimeInput);
            this.GuidOutput = this.Serializer.Serialize(GuidInput);
            this.BytesOutput = this.Serializer.Serialize(BytesInput);

            // models
            this.AccessTokenOutput = this.Serializer.Serialize(AccessTokenInput);
            this.AccountMergeOutput = this.Serializer.Serialize(AccountMergeInput);
            this.AnswerOutput = this.Serializer.Serialize(AnswerInput);
            this.BadgeOutput = this.Serializer.Serialize(BadgeInput);
            this.CommentOutput = this.Serializer.Serialize(CommentInput);
            this.ErrorOutput = this.Serializer.Serialize(ErrorInput);
            this.EventOutput = this.Serializer.Serialize(EventInput);
            this.MobileFeedOutput = this.Serializer.Serialize(MobileFeedInput);
            this.MobileQuestionOutput = this.Serializer.Serialize(MobileQuestionInput);
            this.MobileRepChangeOutput = this.Serializer.Serialize(MobileRepChangeInput);
            this.MobileInboxItemOutput = this.Serializer.Serialize(MobileInboxItemInput);
            this.MobileBadgeAwardOutput = this.Serializer.Serialize(MobileBadgeAwardInput);
            this.MobilePrivilegeOutput = this.Serializer.Serialize(MobilePrivilegeInput);
            this.MobileCommunityBulletinOutput = this.Serializer.Serialize(MobileCommunityBulletinInput);
            this.MobileAssociationBonusOutput = this.Serializer.Serialize(MobileAssociationBonusInput);
            this.MobileCareersJobAdOutput = this.Serializer.Serialize(MobileCareersJobAdInput);
            this.MobileBannerAdOutput = this.Serializer.Serialize(MobileBannerAdInput);
            this.MobileUpdateNoticeOutput = this.Serializer.Serialize(MobileUpdateNoticeInput);
            this.FlagOptionOutput = this.Serializer.Serialize(FlagOptionInput);
            this.InboxItemOutput = this.Serializer.Serialize(InboxItemInput);
            this.InfoOutput = this.Serializer.Serialize(InfoInput);
            this.NetworkUserOutput = this.Serializer.Serialize(NetworkUserInput);
            this.NotificationOutput = this.Serializer.Serialize(NotificationInput);
            this.PostOutput = this.Serializer.Serialize(PostInput);
            this.PrivilegeOutput = this.Serializer.Serialize(PrivilegeInput);
            this.QuestionOutput = this.Serializer.Serialize(QuestionInput);
            this.QuestionTimelineOutput = this.Serializer.Serialize(QuestionTimelineInput);
            this.ReputationOutput = this.Serializer.Serialize(ReputationInput);
            this.ReputationHistoryOutput = this.Serializer.Serialize(ReputationHistoryInput);
            this.RevisionOutput = this.Serializer.Serialize(RevisionInput);
            this.SearchExcerptOutput = this.Serializer.Serialize(SearchExcerptInput);
            this.ShallowUserOutput = this.Serializer.Serialize(ShallowUserInput);
            this.SuggestedEditOutput = this.Serializer.Serialize(SuggestedEditInput);
            this.TagOutput = this.Serializer.Serialize(TagInput);
            this.TagScoreOutput = this.Serializer.Serialize(TagScoreInput);
            this.TagSynonymOutput = this.Serializer.Serialize(TagSynonymInput);
            this.TagWikiOutput = this.Serializer.Serialize(TagWikiInput);
            this.TopTagOutput = this.Serializer.Serialize(TopTagInput);
            this.UserOutput = this.Serializer.Serialize(UserInput);
            this.UserTimelineOutput = this.Serializer.Serialize(UserTimelineInput);
            this.WritePermissionOutput = this.Serializer.Serialize(WritePermissionInput);
            this.MobileBannerAdImageOutput = this.Serializer.Serialize(MobileBannerAdImageInput);
            this.SiteOutput = this.Serializer.Serialize(SiteInput);
            this.RelatedSiteOutput = this.Serializer.Serialize(RelatedSiteInput);
            this.ClosedDetailsOutput = this.Serializer.Serialize(ClosedDetailsInput);
            this.NoticeOutput = this.Serializer.Serialize(NoticeInput);
            this.MigrationInfoOutput = this.Serializer.Serialize(MigrationInfoInput);
            this.BadgeCountOutput = this.Serializer.Serialize(BadgeCountInput);
            this.StylingOutput = this.Serializer.Serialize(StylingInput);
            this.OriginalQuestionOutput = this.Serializer.Serialize(OriginalQuestionInput);
        }

        // Serialize
        [Benchmark] public object _PrimitiveSByteSerialize() => this.Serializer.Serialize(SByteInput);

        [Benchmark] public object _PrimitiveShortSerialize() => this.Serializer.Serialize(ShortInput);

        [Benchmark] public object _PrimitiveIntSerialize() => this.Serializer.Serialize(IntInput);

        [Benchmark] public object _PrimitiveLongSerialize() => this.Serializer.Serialize(LongInput);

        [Benchmark] public object _PrimitiveByteSerialize() => this.Serializer.Serialize(ByteInput);

        [Benchmark] public object _PrimitiveUShortSerialize() => this.Serializer.Serialize(UShortInput);

        [Benchmark] public object _PrimitiveUIntSerialize() => this.Serializer.Serialize(UIntInput);

        [Benchmark] public object _PrimitiveULongSerialize() => this.Serializer.Serialize(ULongInput);

        [Benchmark] public object _PrimitiveBoolSerialize() => this.Serializer.Serialize(BoolInput);

        [Benchmark] public object _PrimitiveStringSerialize() => this.Serializer.Serialize(StringInput);

        [Benchmark] public object _PrimitiveCharSerialize() => this.Serializer.Serialize(CharInput);

        [Benchmark] public object _PrimitiveDateTimeSerialize() => this.Serializer.Serialize(DateTimeInput);

        [Benchmark] public object _PrimitiveGuidSerialize() => this.Serializer.Serialize(GuidInput);

        [Benchmark] public object _PrimitiveBytesSerialize() => this.Serializer.Serialize(BytesInput);

        [Benchmark] public object AccessTokenSerialize() => this.Serializer.Serialize(AccessTokenInput);

        [Benchmark] public object AccountMergeSerialize() => this.Serializer.Serialize(AccountMergeInput);

        [Benchmark] public object AnswerSerialize() => this.Serializer.Serialize(AnswerInput);

        [Benchmark] public object BadgeSerialize() => this.Serializer.Serialize(BadgeInput);

        [Benchmark] public object CommentSerialize() => this.Serializer.Serialize(CommentInput);

        [Benchmark] public object ErrorSerialize() => this.Serializer.Serialize(ErrorInput);

        [Benchmark] public object EventSerialize() => this.Serializer.Serialize(EventInput);

        [Benchmark] public object MobileFeedSerialize() => this.Serializer.Serialize(MobileFeedInput);

        [Benchmark] public object MobileQuestionSerialize() => this.Serializer.Serialize(MobileQuestionInput);

        [Benchmark] public object MobileRepChangeSerialize() => this.Serializer.Serialize(MobileRepChangeInput);

        [Benchmark] public object MobileInboxItemSerialize() => this.Serializer.Serialize(MobileInboxItemInput);

        [Benchmark] public object MobileBadgeAwardSerialize() => this.Serializer.Serialize(MobileBadgeAwardInput);

        [Benchmark] public object MobilePrivilegeSerialize() => this.Serializer.Serialize(MobilePrivilegeInput);

        [Benchmark] public object MobileCommunityBulletinSerialize() => this.Serializer.Serialize(MobileCommunityBulletinInput);

        [Benchmark] public object MobileAssociationBonusSerialize() => this.Serializer.Serialize(MobileAssociationBonusInput);

        [Benchmark] public object MobileCareersJobAdSerialize() => this.Serializer.Serialize(MobileCareersJobAdInput);

        [Benchmark] public object MobileBannerAdSerialize() => this.Serializer.Serialize(MobileBannerAdInput);

        [Benchmark] public object MobileUpdateNoticeSerialize() => this.Serializer.Serialize(MobileUpdateNoticeInput);

        [Benchmark] public object FlagOptionSerialize() => this.Serializer.Serialize(FlagOptionInput);

        [Benchmark] public object InboxItemSerialize() => this.Serializer.Serialize(InboxItemInput);

        [Benchmark] public object InfoSerialize() => this.Serializer.Serialize(InfoInput);

        [Benchmark] public object NetworkUserSerialize() => this.Serializer.Serialize(NetworkUserInput);

        [Benchmark] public object NotificationSerialize() => this.Serializer.Serialize(NotificationInput);

        [Benchmark] public object PostSerialize() => this.Serializer.Serialize(PostInput);

        [Benchmark] public object PrivilegeSerialize() => this.Serializer.Serialize(PrivilegeInput);

        [Benchmark] public object QuestionSerialize() => this.Serializer.Serialize(QuestionInput);

        [Benchmark] public object QuestionTimelineSerialize() => this.Serializer.Serialize(QuestionTimelineInput);

        [Benchmark] public object ReputationSerialize() => this.Serializer.Serialize(ReputationInput);

        [Benchmark] public object ReputationHistorySerialize() => this.Serializer.Serialize(ReputationHistoryInput);

        [Benchmark] public object RevisionSerialize() => this.Serializer.Serialize(RevisionInput);

        [Benchmark] public object SearchExcerptSerialize() => this.Serializer.Serialize(SearchExcerptInput);

        [Benchmark] public object ShallowUserSerialize() => this.Serializer.Serialize(ShallowUserInput);

        [Benchmark] public object SuggestedEditSerialize() => this.Serializer.Serialize(SuggestedEditInput);

        [Benchmark] public object TagSerialize() => this.Serializer.Serialize(TagInput);

        [Benchmark] public object TagScoreSerialize() => this.Serializer.Serialize(TagScoreInput);

        [Benchmark] public object TagSynonymSerialize() => this.Serializer.Serialize(TagSynonymInput);

        [Benchmark] public object TagWikiSerialize() => this.Serializer.Serialize(TagWikiInput);

        [Benchmark] public object TopTagSerialize() => this.Serializer.Serialize(TopTagInput);

        [Benchmark] public object UserSerialize() => this.Serializer.Serialize(UserInput);

        [Benchmark] public object UserTimelineSerialize() => this.Serializer.Serialize(UserTimelineInput);

        [Benchmark] public object WritePermissionSerialize() => this.Serializer.Serialize(WritePermissionInput);

        [Benchmark] public object MobileBannerAdImageSerialize() => this.Serializer.Serialize(MobileBannerAdImageInput);

        [Benchmark] public object SiteSerialize() => this.Serializer.Serialize(SiteInput);

        [Benchmark] public object RelatedSiteSerialize() => this.Serializer.Serialize(RelatedSiteInput);

        [Benchmark] public object ClosedDetailsSerialize() => this.Serializer.Serialize(ClosedDetailsInput);

        [Benchmark] public object NoticeSerialize() => this.Serializer.Serialize(NoticeInput);

        [Benchmark] public object MigrationInfoSerialize() => this.Serializer.Serialize(MigrationInfoInput);

        [Benchmark] public object BadgeCountSerialize() => this.Serializer.Serialize(BadgeCountInput);

        [Benchmark] public object StylingSerialize() => this.Serializer.Serialize(StylingInput);

        [Benchmark] public object OriginalQuestionSerialize() => this.Serializer.Serialize(OriginalQuestionInput);

        // Deserialize
        [Benchmark] public SByte _PrimitiveSByteDeserialize() => this.Serializer.Deserialize<SByte>(this.SByteOutput);

        [Benchmark] public short _PrimitiveShortDeserialize() => this.Serializer.Deserialize<short>(this.ShortOutput);

        [Benchmark] public Int32 _PrimitiveIntDeserialize() => this.Serializer.Deserialize<Int32>(this.IntOutput);

        [Benchmark] public Int64 _PrimitiveLongDeserialize() => this.Serializer.Deserialize<Int64>(this.LongOutput);

        [Benchmark] public Byte _PrimitiveByteDeserialize() => this.Serializer.Deserialize<Byte>(this.ByteOutput);

        [Benchmark] public ushort _PrimitiveUShortDeserialize() => this.Serializer.Deserialize<ushort>(this.UShortOutput);

        [Benchmark] public uint _PrimitiveUIntDeserialize() => this.Serializer.Deserialize<uint>(this.UIntOutput);

        [Benchmark] public ulong _PrimitiveULongDeserialize() => this.Serializer.Deserialize<ulong>(this.ULongOutput);

        [Benchmark] public bool _PrimitiveBoolDeserialize() => this.Serializer.Deserialize<bool>(this.BoolOutput);

        [Benchmark] public String _PrimitiveStringDeserialize() => this.Serializer.Deserialize<String>(this.StringOutput);

        [Benchmark] public Char _PrimitiveCharDeserialize() => this.Serializer.Deserialize<Char>(this.CharOutput);

        [Benchmark] public DateTime _PrimitiveDateTimeDeserialize() => this.Serializer.Deserialize<DateTime>(this.DateTimeOutput);

        [Benchmark] public Guid _PrimitiveGuidDeserialize() => this.Serializer.Deserialize<Guid>(this.GuidOutput);

        [Benchmark] public byte[] _PrimitiveBytesDeserialize() => this.Serializer.Deserialize<byte[]>(this.BytesOutput);

        [Benchmark] public AccessToken AccessTokenDeserialize() => this.Serializer.Deserialize<AccessToken>(this.AccessTokenOutput);

        [Benchmark] public AccountMerge AccountMergeDeserialize() => this.Serializer.Deserialize<AccountMerge>(this.AccountMergeOutput);

        [Benchmark] public Answer AnswerDeserialize() => this.Serializer.Deserialize<Answer>(this.AnswerOutput);

        [Benchmark] public Badge BadgeDeserialize() => this.Serializer.Deserialize<Badge>(this.BadgeOutput);

        [Benchmark] public Comment CommentDeserialize() => this.Serializer.Deserialize<Comment>(this.CommentOutput);

        [Benchmark] public Error ErrorDeserialize() => this.Serializer.Deserialize<Error>(this.ErrorOutput);

        [Benchmark] public Event EventDeserialize() => this.Serializer.Deserialize<Event>(this.EventOutput);

        [Benchmark] public MobileFeed MobileFeedDeserialize() => this.Serializer.Deserialize<MobileFeed>(this.MobileFeedOutput);

        [Benchmark] public MobileQuestion MobileQuestionDeserialize() => this.Serializer.Deserialize<MobileQuestion>(this.MobileQuestionOutput);

        [Benchmark] public MobileRepChange MobileRepChangeDeserialize() => this.Serializer.Deserialize<MobileRepChange>(this.MobileRepChangeOutput);

        [Benchmark] public MobileInboxItem MobileInboxItemDeserialize() => this.Serializer.Deserialize<MobileInboxItem>(this.MobileInboxItemOutput);

        [Benchmark] public MobileBadgeAward MobileBadgeAwardDeserialize() => this.Serializer.Deserialize<MobileBadgeAward>(this.MobileBadgeAwardOutput);

        [Benchmark] public MobilePrivilege MobilePrivilegeDeserialize() => this.Serializer.Deserialize<MobilePrivilege>(this.MobilePrivilegeOutput);

        [Benchmark] public MobileCommunityBulletin MobileCommunityBulletinDeserialize() => this.Serializer.Deserialize<MobileCommunityBulletin>(this.MobileCommunityBulletinOutput);

        [Benchmark] public MobileAssociationBonus MobileAssociationBonusDeserialize() => this.Serializer.Deserialize<MobileAssociationBonus>(this.MobileAssociationBonusOutput);

        [Benchmark] public MobileCareersJobAd MobileCareersJobAdDeserialize() => this.Serializer.Deserialize<MobileCareersJobAd>(this.MobileCareersJobAdOutput);

        [Benchmark] public MobileBannerAd MobileBannerAdDeserialize() => this.Serializer.Deserialize<MobileBannerAd>(this.MobileBannerAdOutput);

        [Benchmark] public MobileUpdateNotice MobileUpdateNoticeDeserialize() => this.Serializer.Deserialize<MobileUpdateNotice>(this.MobileUpdateNoticeOutput);

        [Benchmark] public FlagOption FlagOptionDeserialize() => this.Serializer.Deserialize<FlagOption>(this.FlagOptionOutput);

        [Benchmark] public InboxItem InboxItemDeserialize() => this.Serializer.Deserialize<InboxItem>(this.InboxItemOutput);

        [Benchmark] public Info InfoDeserialize() => this.Serializer.Deserialize<Info>(this.InfoOutput);

        [Benchmark] public NetworkUser NetworkUserDeserialize() => this.Serializer.Deserialize<NetworkUser>(this.NetworkUserOutput);

        [Benchmark] public Notification NotificationDeserialize() => this.Serializer.Deserialize<Notification>(this.NotificationOutput);

        [Benchmark] public Post PostDeserialize() => this.Serializer.Deserialize<Post>(this.PostOutput);

        [Benchmark] public Privilege PrivilegeDeserialize() => this.Serializer.Deserialize<Privilege>(this.PrivilegeOutput);

        [Benchmark] public Question QuestionDeserialize() => this.Serializer.Deserialize<Question>(this.QuestionOutput);

        [Benchmark] public QuestionTimeline QuestionTimelineDeserialize() => this.Serializer.Deserialize<QuestionTimeline>(this.QuestionTimelineOutput);

        [Benchmark] public Reputation ReputationDeserialize() => this.Serializer.Deserialize<Reputation>(this.ReputationOutput);

        [Benchmark] public ReputationHistory ReputationHistoryDeserialize() => this.Serializer.Deserialize<ReputationHistory>(this.ReputationHistoryOutput);

        [Benchmark] public Revision RevisionDeserialize() => this.Serializer.Deserialize<Revision>(this.RevisionOutput);

        [Benchmark] public SearchExcerpt SearchExcerptDeserialize() => this.Serializer.Deserialize<SearchExcerpt>(this.SearchExcerptOutput);

        [Benchmark] public ShallowUser ShallowUserDeserialize() => this.Serializer.Deserialize<ShallowUser>(this.ShallowUserOutput);

        [Benchmark] public SuggestedEdit SuggestedEditDeserialize() => this.Serializer.Deserialize<SuggestedEdit>(this.SuggestedEditOutput);

        [Benchmark] public Tag TagDeserialize() => this.Serializer.Deserialize<Tag>(this.TagOutput);

        [Benchmark] public TagScore TagScoreDeserialize() => this.Serializer.Deserialize<TagScore>(this.TagScoreOutput);

        [Benchmark] public TagSynonym TagSynonymDeserialize() => this.Serializer.Deserialize<TagSynonym>(this.TagSynonymOutput);

        [Benchmark] public TagWiki TagWikiDeserialize() => this.Serializer.Deserialize<TagWiki>(this.TagWikiOutput);

        [Benchmark] public TopTag TopTagDeserialize() => this.Serializer.Deserialize<TopTag>(this.TopTagOutput);

        [Benchmark] public User UserDeserialize() => this.Serializer.Deserialize<User>(this.UserOutput);

        [Benchmark] public UserTimeline UserTimelineDeserialize() => this.Serializer.Deserialize<UserTimeline>(this.UserTimelineOutput);

        [Benchmark] public WritePermission WritePermissionDeserialize() => this.Serializer.Deserialize<WritePermission>(this.WritePermissionOutput);

        [Benchmark] public MobileBannerAd.MobileBannerAdImage MobileBannerAdImageDeserialize() => this.Serializer.Deserialize<MobileBannerAd.MobileBannerAdImage>(this.MobileBannerAdImageOutput);

        [Benchmark] public Info.Site SiteDeserialize() => this.Serializer.Deserialize<Info.Site>(this.SiteOutput);

        [Benchmark] public Info.RelatedSite RelatedSiteDeserialize() => this.Serializer.Deserialize<Info.RelatedSite>(this.RelatedSiteOutput);

        [Benchmark] public Question.ClosedDetails ClosedDetailsDeserialize() => this.Serializer.Deserialize<Question.ClosedDetails>(this.ClosedDetailsOutput);

        [Benchmark] public Question.Notice NoticeDeserialize() => this.Serializer.Deserialize<Question.Notice>(this.NoticeOutput);

        [Benchmark] public Question.MigrationInfo MigrationInfoDeserialize() => this.Serializer.Deserialize<Question.MigrationInfo>(this.MigrationInfoOutput);

        [Benchmark] public User.BadgeCount BadgeCountDeserialize() => this.Serializer.Deserialize<User.BadgeCount>(this.BadgeCountOutput);

        [Benchmark] public Info.Site.Styling StylingDeserialize() => this.Serializer.Deserialize<Info.Site.Styling>(this.StylingOutput);

        [Benchmark] public Question.ClosedDetails.OriginalQuestion OriginalQuestionDeserialize() => this.Serializer.Deserialize<Question.ClosedDetails.OriginalQuestion>(this.OriginalQuestionOutput);
    }

    [Config(typeof(BenchmarkConfig))]
    public class ShortRun_AllSerializerBenchmark_BytesInOut
    {
        [ParamsSource(nameof(Serializers))]
        public SerializerBase Serializer;

        private bool isContractless;

        // Currently BenchmarkDotNet does not detect inherited ParamsSource so use copy and paste:)
        public IEnumerable<SerializerBase> Serializers => new SerializerBase[]
        {
            new MessagePack_v1(),
            new MessagePack_v2(),
            new MsgPack_v2_opt(),
            new MessagePackLz4_v1(),
            new MessagePackLz4_v2(),
            new MsgPack_v1_string(),
            new MsgPack_v2_string(),
            new MsgPack_v1_str_lz4(),
            new MsgPack_v2_str_lz4(),
            new ProtobufNetSerializer(),
            new JsonNetSerializer(),
            new BsonNetSerializer(),
            new BinaryFormatterSerializer(),
            new DataContractSerializer(),
            new HyperionSerializer(),
            new JilSerializer(),
            new SpanJsonSerializer(),
            new Utf8JsonSerializer(),
            new SystemTextJsonSerializer(),
            new MsgPackCliSerializer(),
            new FsPicklerSerializer(),
            new CerasSerializer(),
            new OdinSerializer_(),
        };

        protected static readonly ExpressionTreeFixture ExpressionTreeFixture = new ExpressionTreeFixture();

        // primitives
        protected static readonly int IntInput = ExpressionTreeFixture.Create<int>();

        // models
        protected static readonly Benchmark.Models.Answer AnswerInput = ExpressionTreeFixture.Create<Benchmark.Models.Answer>();
        // not same data so does not gurantee correctly.
        protected static readonly Benchmark.Models.Answer2 Answer2Input = ExpressionTreeFixture.Create<Benchmark.Models.Answer2>();

        private object IntOutput;
        private object AnswerOutput;

        [GlobalSetup]
        public void Setup()
        {
            this.isContractless = (Serializer is MsgPack_v1_string) || (Serializer is MsgPack_v2_string) || (Serializer is MsgPack_v1_str_lz4) || (Serializer is MsgPack_v2_str_lz4);

            // primitives
            this.IntOutput = this.Serializer.Serialize(IntInput);

            // models
            if (isContractless)
            {
                this.AnswerOutput = this.Serializer.Serialize(Answer2Input);
            }
            else
            {
                this.AnswerOutput = this.Serializer.Serialize(AnswerInput);
            }
        }

        // Serialize
        /* [Benchmark] public object _PrimitiveIntSerialize() => this.Serializer.Serialize(IntInput); */

        [Benchmark]
        public object AnswerSerialize()
        {
            if (isContractless)
            {
                return this.Serializer.Serialize(Answer2Input);
            }
            else
            {
                return this.Serializer.Serialize(AnswerInput);
            }
        }

        // Deserialize
        /* [Benchmark] public Int32 _PrimitiveIntDeserialize() => this.Serializer.Deserialize<Int32>(this.IntOutput); */

        [Benchmark]
        public object AnswerDeserialize()
        {
            if (isContractless)
            {
                return this.Serializer.Deserialize<Answer2>(this.AnswerOutput);
            }
            else
            {
                return this.Serializer.Deserialize<Answer>(this.AnswerOutput);
            }
        }
    }

    [Config(typeof(BenchmarkConfig))]
    public class ShortRun_MsgPackV1_Vs_MsgPackV2_BytesInOut
    {
        [ParamsSource(nameof(Serializers))]
        public SerializerBase Serializer;

        // Currently BenchmarkDotNet does not detect inherited ParamsSource so use copy and paste:)
        public IEnumerable<SerializerBase> Serializers => new SerializerBase[]
        {
            new MessagePack_v1(),
            new MessagePack_v2(),
        };

        protected static readonly ExpressionTreeFixture ExpressionTreeFixture = new ExpressionTreeFixture();

        // primitives
        protected static readonly int IntInput = ExpressionTreeFixture.Create<int>();

        // models
        protected static readonly Benchmark.Models.Answer AnswerInput = ExpressionTreeFixture.Create<Benchmark.Models.Answer>();

        private object IntOutput;
        private object AnswerOutput;

        [GlobalSetup]
        public void Setup()
        {
            // primitives
            this.IntOutput = this.Serializer.Serialize(IntInput);

            // models
            this.AnswerOutput = this.Serializer.Serialize(AnswerInput);
        }

        // Serialize
        [Benchmark] public object _PrimitiveIntSerialize() => this.Serializer.Serialize(IntInput);

        [Benchmark] public object AnswerSerialize() => this.Serializer.Serialize(AnswerInput);

        // Deserialize
        [Benchmark] public Int32 _PrimitiveIntDeserialize() => this.Serializer.Deserialize<Int32>(this.IntOutput);

        [Benchmark] public Answer AnswerDeserialize() => this.Serializer.Deserialize<Answer>(this.AnswerOutput);
    }
}