From 4e3c41349383fa6275a18a1c9c462c209ab361a8 Mon Sep 17 00:00:00 2001 From: BSBandme Date: Wed, 7 Mar 2018 00:35:42 -0800 Subject: Add go benchmark --- .../benchmark_message1_proto2.proto | 78 --------------------- .../benchmark_message1_proto3.proto | 78 --------------------- .../dataset.google_message1_proto2.pb | Bin 289 -> 0 bytes .../dataset.google_message1_proto3.pb | Bin 289 -> 0 bytes .../proto2/benchmark_message1_proto2.proto | 78 +++++++++++++++++++++ .../proto2/dataset.google_message1_proto2.pb | Bin 0 -> 289 bytes .../proto3/benchmark_message1_proto3.proto | 78 +++++++++++++++++++++ .../proto3/dataset.google_message1_proto3.pb | Bin 0 -> 289 bytes 8 files changed, 156 insertions(+), 156 deletions(-) delete mode 100644 benchmarks/datasets/google_message1/benchmark_message1_proto2.proto delete mode 100644 benchmarks/datasets/google_message1/benchmark_message1_proto3.proto delete mode 100644 benchmarks/datasets/google_message1/dataset.google_message1_proto2.pb delete mode 100644 benchmarks/datasets/google_message1/dataset.google_message1_proto3.pb create mode 100644 benchmarks/datasets/google_message1/proto2/benchmark_message1_proto2.proto create mode 100644 benchmarks/datasets/google_message1/proto2/dataset.google_message1_proto2.pb create mode 100644 benchmarks/datasets/google_message1/proto3/benchmark_message1_proto3.proto create mode 100644 benchmarks/datasets/google_message1/proto3/dataset.google_message1_proto3.pb (limited to 'benchmarks/datasets') diff --git a/benchmarks/datasets/google_message1/benchmark_message1_proto2.proto b/benchmarks/datasets/google_message1/benchmark_message1_proto2.proto deleted file mode 100644 index 21261905..00000000 --- a/benchmarks/datasets/google_message1/benchmark_message1_proto2.proto +++ /dev/null @@ -1,78 +0,0 @@ -// Benchmark messages for proto2. - -syntax = "proto2"; - -package benchmarks.proto2; -option java_package = "com.google.protobuf.benchmarks"; - -// This is the default, but we specify it here explicitly. -option optimize_for = SPEED; - -option cc_enable_arenas = true; - -message GoogleMessage1 { - required string field1 = 1; - optional string field9 = 9; - optional string field18 = 18; - optional bool field80 = 80 [default = false]; - optional bool field81 = 81 [default = true]; - required int32 field2 = 2; - required int32 field3 = 3; - optional int32 field280 = 280; - optional int32 field6 = 6 [default = 0]; - optional int64 field22 = 22; - optional string field4 = 4; - repeated fixed64 field5 = 5; - optional bool field59 = 59 [default = false]; - optional string field7 = 7; - optional int32 field16 = 16; - optional int32 field130 = 130 [default = 0]; - optional bool field12 = 12 [default = true]; - optional bool field17 = 17 [default = true]; - optional bool field13 = 13 [default = true]; - optional bool field14 = 14 [default = true]; - optional int32 field104 = 104 [default = 0]; - optional int32 field100 = 100 [default = 0]; - optional int32 field101 = 101 [default = 0]; - optional string field102 = 102; - optional string field103 = 103; - optional int32 field29 = 29 [default = 0]; - optional bool field30 = 30 [default = false]; - optional int32 field60 = 60 [default = -1]; - optional int32 field271 = 271 [default = -1]; - optional int32 field272 = 272 [default = -1]; - optional int32 field150 = 150; - optional int32 field23 = 23 [default = 0]; - optional bool field24 = 24 [default = false]; - optional int32 field25 = 25 [default = 0]; - optional GoogleMessage1SubMessage field15 = 15; - optional bool field78 = 78; - optional int32 field67 = 67 [default = 0]; - optional int32 field68 = 68; - optional int32 field128 = 128 [default = 0]; - optional string field129 = 129 [default = "xxxxxxxxxxxxxxxxxxxxx"]; - optional int32 field131 = 131 [default = 0]; -} - -message GoogleMessage1SubMessage { - optional int32 field1 = 1 [default = 0]; - optional int32 field2 = 2 [default = 0]; - optional int32 field3 = 3 [default = 0]; - optional string field15 = 15; - optional bool field12 = 12 [default = true]; - optional int64 field13 = 13; - optional int64 field14 = 14; - optional int32 field16 = 16; - optional int32 field19 = 19 [default = 2]; - optional bool field20 = 20 [default = true]; - optional bool field28 = 28 [default = true]; - optional fixed64 field21 = 21; - optional int32 field22 = 22; - optional bool field23 = 23 [default = false]; - optional bool field206 = 206 [default = false]; - optional fixed32 field203 = 203; - optional int32 field204 = 204; - optional string field205 = 205; - optional uint64 field207 = 207; - optional uint64 field300 = 300; -} diff --git a/benchmarks/datasets/google_message1/benchmark_message1_proto3.proto b/benchmarks/datasets/google_message1/benchmark_message1_proto3.proto deleted file mode 100644 index 090b554b..00000000 --- a/benchmarks/datasets/google_message1/benchmark_message1_proto3.proto +++ /dev/null @@ -1,78 +0,0 @@ -// Benchmark messages for proto3. - -syntax = "proto3"; - -package benchmarks.proto3; -option java_package = "com.google.protobuf.benchmarks"; - -// This is the default, but we specify it here explicitly. -option optimize_for = SPEED; - -option cc_enable_arenas = true; - -message GoogleMessage1 { - string field1 = 1; - string field9 = 9; - string field18 = 18; - bool field80 = 80; - bool field81 = 81; - int32 field2 = 2; - int32 field3 = 3; - int32 field280 = 280; - int32 field6 = 6; - int64 field22 = 22; - string field4 = 4; - repeated fixed64 field5 = 5; - bool field59 = 59; - string field7 = 7; - int32 field16 = 16; - int32 field130 = 130; - bool field12 = 12; - bool field17 = 17; - bool field13 = 13; - bool field14 = 14; - int32 field104 = 104; - int32 field100 = 100; - int32 field101 = 101; - string field102 = 102; - string field103 = 103; - int32 field29 = 29; - bool field30 = 30; - int32 field60 = 60; - int32 field271 = 271; - int32 field272 = 272; - int32 field150 = 150; - int32 field23 = 23; - bool field24 = 24; - int32 field25 = 25; - GoogleMessage1SubMessage field15 = 15; - bool field78 = 78; - int32 field67 = 67; - int32 field68 = 68; - int32 field128 = 128; - string field129 = 129; - int32 field131 = 131; -} - -message GoogleMessage1SubMessage { - int32 field1 = 1; - int32 field2 = 2; - int32 field3 = 3; - string field15 = 15; - bool field12 = 12; - int64 field13 = 13; - int64 field14 = 14; - int32 field16 = 16; - int32 field19 = 19; - bool field20 = 20; - bool field28 = 28; - fixed64 field21 = 21; - int32 field22 = 22; - bool field23 = 23; - bool field206 = 206; - fixed32 field203 = 203; - int32 field204 = 204; - string field205 = 205; - uint64 field207 = 207; - uint64 field300 = 300; -} diff --git a/benchmarks/datasets/google_message1/dataset.google_message1_proto2.pb b/benchmarks/datasets/google_message1/dataset.google_message1_proto2.pb deleted file mode 100644 index f6fe7848..00000000 Binary files a/benchmarks/datasets/google_message1/dataset.google_message1_proto2.pb and /dev/null differ diff --git a/benchmarks/datasets/google_message1/dataset.google_message1_proto3.pb b/benchmarks/datasets/google_message1/dataset.google_message1_proto3.pb deleted file mode 100644 index 4955bed3..00000000 Binary files a/benchmarks/datasets/google_message1/dataset.google_message1_proto3.pb and /dev/null differ diff --git a/benchmarks/datasets/google_message1/proto2/benchmark_message1_proto2.proto b/benchmarks/datasets/google_message1/proto2/benchmark_message1_proto2.proto new file mode 100644 index 00000000..21261905 --- /dev/null +++ b/benchmarks/datasets/google_message1/proto2/benchmark_message1_proto2.proto @@ -0,0 +1,78 @@ +// Benchmark messages for proto2. + +syntax = "proto2"; + +package benchmarks.proto2; +option java_package = "com.google.protobuf.benchmarks"; + +// This is the default, but we specify it here explicitly. +option optimize_for = SPEED; + +option cc_enable_arenas = true; + +message GoogleMessage1 { + required string field1 = 1; + optional string field9 = 9; + optional string field18 = 18; + optional bool field80 = 80 [default = false]; + optional bool field81 = 81 [default = true]; + required int32 field2 = 2; + required int32 field3 = 3; + optional int32 field280 = 280; + optional int32 field6 = 6 [default = 0]; + optional int64 field22 = 22; + optional string field4 = 4; + repeated fixed64 field5 = 5; + optional bool field59 = 59 [default = false]; + optional string field7 = 7; + optional int32 field16 = 16; + optional int32 field130 = 130 [default = 0]; + optional bool field12 = 12 [default = true]; + optional bool field17 = 17 [default = true]; + optional bool field13 = 13 [default = true]; + optional bool field14 = 14 [default = true]; + optional int32 field104 = 104 [default = 0]; + optional int32 field100 = 100 [default = 0]; + optional int32 field101 = 101 [default = 0]; + optional string field102 = 102; + optional string field103 = 103; + optional int32 field29 = 29 [default = 0]; + optional bool field30 = 30 [default = false]; + optional int32 field60 = 60 [default = -1]; + optional int32 field271 = 271 [default = -1]; + optional int32 field272 = 272 [default = -1]; + optional int32 field150 = 150; + optional int32 field23 = 23 [default = 0]; + optional bool field24 = 24 [default = false]; + optional int32 field25 = 25 [default = 0]; + optional GoogleMessage1SubMessage field15 = 15; + optional bool field78 = 78; + optional int32 field67 = 67 [default = 0]; + optional int32 field68 = 68; + optional int32 field128 = 128 [default = 0]; + optional string field129 = 129 [default = "xxxxxxxxxxxxxxxxxxxxx"]; + optional int32 field131 = 131 [default = 0]; +} + +message GoogleMessage1SubMessage { + optional int32 field1 = 1 [default = 0]; + optional int32 field2 = 2 [default = 0]; + optional int32 field3 = 3 [default = 0]; + optional string field15 = 15; + optional bool field12 = 12 [default = true]; + optional int64 field13 = 13; + optional int64 field14 = 14; + optional int32 field16 = 16; + optional int32 field19 = 19 [default = 2]; + optional bool field20 = 20 [default = true]; + optional bool field28 = 28 [default = true]; + optional fixed64 field21 = 21; + optional int32 field22 = 22; + optional bool field23 = 23 [default = false]; + optional bool field206 = 206 [default = false]; + optional fixed32 field203 = 203; + optional int32 field204 = 204; + optional string field205 = 205; + optional uint64 field207 = 207; + optional uint64 field300 = 300; +} diff --git a/benchmarks/datasets/google_message1/proto2/dataset.google_message1_proto2.pb b/benchmarks/datasets/google_message1/proto2/dataset.google_message1_proto2.pb new file mode 100644 index 00000000..f6fe7848 Binary files /dev/null and b/benchmarks/datasets/google_message1/proto2/dataset.google_message1_proto2.pb differ diff --git a/benchmarks/datasets/google_message1/proto3/benchmark_message1_proto3.proto b/benchmarks/datasets/google_message1/proto3/benchmark_message1_proto3.proto new file mode 100644 index 00000000..090b554b --- /dev/null +++ b/benchmarks/datasets/google_message1/proto3/benchmark_message1_proto3.proto @@ -0,0 +1,78 @@ +// Benchmark messages for proto3. + +syntax = "proto3"; + +package benchmarks.proto3; +option java_package = "com.google.protobuf.benchmarks"; + +// This is the default, but we specify it here explicitly. +option optimize_for = SPEED; + +option cc_enable_arenas = true; + +message GoogleMessage1 { + string field1 = 1; + string field9 = 9; + string field18 = 18; + bool field80 = 80; + bool field81 = 81; + int32 field2 = 2; + int32 field3 = 3; + int32 field280 = 280; + int32 field6 = 6; + int64 field22 = 22; + string field4 = 4; + repeated fixed64 field5 = 5; + bool field59 = 59; + string field7 = 7; + int32 field16 = 16; + int32 field130 = 130; + bool field12 = 12; + bool field17 = 17; + bool field13 = 13; + bool field14 = 14; + int32 field104 = 104; + int32 field100 = 100; + int32 field101 = 101; + string field102 = 102; + string field103 = 103; + int32 field29 = 29; + bool field30 = 30; + int32 field60 = 60; + int32 field271 = 271; + int32 field272 = 272; + int32 field150 = 150; + int32 field23 = 23; + bool field24 = 24; + int32 field25 = 25; + GoogleMessage1SubMessage field15 = 15; + bool field78 = 78; + int32 field67 = 67; + int32 field68 = 68; + int32 field128 = 128; + string field129 = 129; + int32 field131 = 131; +} + +message GoogleMessage1SubMessage { + int32 field1 = 1; + int32 field2 = 2; + int32 field3 = 3; + string field15 = 15; + bool field12 = 12; + int64 field13 = 13; + int64 field14 = 14; + int32 field16 = 16; + int32 field19 = 19; + bool field20 = 20; + bool field28 = 28; + fixed64 field21 = 21; + int32 field22 = 22; + bool field23 = 23; + bool field206 = 206; + fixed32 field203 = 203; + int32 field204 = 204; + string field205 = 205; + uint64 field207 = 207; + uint64 field300 = 300; +} diff --git a/benchmarks/datasets/google_message1/proto3/dataset.google_message1_proto3.pb b/benchmarks/datasets/google_message1/proto3/dataset.google_message1_proto3.pb new file mode 100644 index 00000000..4955bed3 Binary files /dev/null and b/benchmarks/datasets/google_message1/proto3/dataset.google_message1_proto3.pb differ -- cgit v1.2.3