Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Benchmark serializer naming #1149

Merged

Conversation

JohannesDeml
Copy link
Contributor

This is another (a bit larger) cleanup for the benchmarks.

  • All serializers are now in the namespace Benchmark.Serializers
  • All serializers now have a ToString() method to define how they are named in the BenchmarkDotNet tables
  • All serializers except of MessagePackSerializer now have a class name that matches their file name (getting rid of the #pragma warning disable SA1649 // File name should match first type name)

The resulting table looks like this now:

Method Serializer Mean Error DataSize Gen 0 Gen 1 Gen 2 Allocated
AnswerDeserialize BinaryFormatter 56.833 μs NA - 4.0894 0.3052 - 34568 B
AnswerDeserialize BsonNet 36.755 μs NA - 1.2207 - - 10248 B
AnswerDeserialize Ceras 4.233 μs NA - 0.2136 - - 1816 B
AnswerDeserialize DataContract 36.496 μs NA - 2.0142 0.0610 - 17064 B
AnswerDeserialize FsPickler 6.553 μs NA - 0.4654 0.0076 - 3936 B
AnswerDeserialize Hyperion 5.669 μs NA - 0.5035 - - 4216 B
AnswerDeserialize Jil 10.960 μs NA - 0.7172 - - 6032 B
AnswerDeserialize JsonNet 37.844 μs NA - 1.2207 - - 10360 B
AnswerDeserialize MessagePack_v1 2.406 μs NA - 0.2136 - - 1816 B
AnswerDeserialize MessagePack_v2 3.344 μs NA - 0.2136 - - 1816 B
AnswerDeserialize MessagePackLz4_v1 2.609 μs NA - 0.2136 - - 1816 B
AnswerDeserialize MessagePackLz4_v2 4.260 μs NA - 0.2136 - - 1816 B
AnswerDeserialize MsgPack_v1_str_lz4 3.827 μs NA - 0.2136 - - 1816 B
AnswerDeserialize MsgPack_v1_string 3.592 μs NA - 0.2136 - - 1816 B
AnswerDeserialize MsgPack_v2_opt 4.855 μs NA - 0.2136 - - 1816 B
AnswerDeserialize MsgPack_v2_str_lz4 6.531 μs NA - 0.2136 - - 1816 B
AnswerDeserialize MsgPack_v2_string 5.556 μs NA - 0.2136 - - 1816 B
AnswerDeserialize MsgPackCli 8.558 μs NA - 0.3357 - - 2904 B
AnswerDeserialize ProtobufNet 5.752 μs NA - 0.4807 0.0076 - 4064 B
AnswerDeserialize SpanJson 6.044 μs NA - 0.2213 - - 1864 B
AnswerDeserialize SystemTextJson 16.219 μs NA - 0.2441 - - 2208 B
AnswerDeserialize UTF8Json 9.998 μs NA - 0.2136 - - 1864 B
AnswerSerialize BinaryFormatter 66.971 μs NA 3724 B 5.3711 0.3662 - 45642 B
AnswerSerialize BsonNet 31.548 μs NA 1418 B 2.5635 0.1831 - 21600 B
AnswerSerialize Ceras 3.562 μs NA 476 B 0.5608 0.0038 - 4704 B
AnswerSerialize DataContract 15.066 μs NA 2808 B 1.8311 0.0458 - 15440 B
AnswerSerialize FsPickler 13.236 μs NA 793 B 0.8240 - - 6952 B
AnswerSerialize Hyperion 7.305 μs NA 1015 B 0.5722 - - 4824 B
AnswerSerialize Jil 6.322 μs NA 1827 B 1.2741 0.0229 - 10688 B
AnswerSerialize JsonNet 21.092 μs NA 1799 B 1.4954 0.0305 - 12584 B
AnswerSerialize MessagePack_v1 3.068 μs NA 469 B 0.0572 - - 496 B
AnswerSerialize MessagePack_v2 3.224 μs NA 469 B 0.0572 - - 496 B
AnswerSerialize MessagePackLz4_v1 3.860 μs NA 450 B 0.0572 - - 480 B
AnswerSerialize MessagePackLz4_v2 4.301 μs NA 451 B 0.0534 - - 480 B
AnswerSerialize MsgPack_v1_str_lz4 5.345 μs NA 864 B 0.0992 - - 888 B
AnswerSerialize MsgPack_v1_string 3.801 μs NA 1263 B 0.1526 - - 1296 B
AnswerSerialize MsgPack_v2_opt 3.086 μs NA 433 B 0.0534 - - 464 B
AnswerSerialize MsgPack_v2_str_lz4 6.036 μs NA 865 B 0.1068 - - 896 B
AnswerSerialize MsgPack_v2_string 3.900 μs NA 1263 B 0.1526 - - 1288 B
AnswerSerialize MsgPackCli 6.460 μs NA 519 B 0.4578 - - 3864 B
AnswerSerialize ProtobufNet 2.433 μs NA 497 B 0.1564 - - 1336 B
AnswerSerialize SpanJson 3.824 μs NA 1869 B 0.2213 - - 1904 B
AnswerSerialize SystemTextJson 8.367 μs NA 1796 B 0.2747 - - 2336 B
AnswerSerialize UTF8Json 6.091 μs NA 1869 B 0.2213 - - 1896 B

So the hacky Jil_, Ceras_ and so on got their correct names..

This way they will be named with ToString in the benchmarkdotnet generated tables
Rename of ProtobufSerializer to ProtobufNetSerializer and BinaryFormatter to BinaryFormatterSerializer to have more consistency.
@JohannesDeml
Copy link
Contributor Author

Not sure why tthe CI didn't run through... seems like the windows task was canceled:

##[error]An error occurred while provisioning resources (Error Type: Disconnect).
,##[warning]Received request to deprovision: The request was cancelled by the remote provider.
Agent: Azure Pipelines 4
Started: Today at 10:43 AM
Duration: 14m 29s

Copy link
Collaborator

@AArnott AArnott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@AArnott AArnott merged commit 78c29b3 into MessagePack-CSharp:develop Dec 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants