• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Protocol Buffers - Google's data interchange format
2// Copyright 2008 Google Inc.  All rights reserved.
3// https://developers.google.com/protocol-buffers/
4//
5// Redistribution and use in source and binary forms, with or without
6// modification, are permitted provided that the following conditions are
7// met:
8//
9//     * Redistributions of source code must retain the above copyright
10// notice, this list of conditions and the following disclaimer.
11//     * Redistributions in binary form must reproduce the above
12// copyright notice, this list of conditions and the following disclaimer
13// in the documentation and/or other materials provided with the
14// distribution.
15//     * Neither the name of Google Inc. nor the names of its
16// contributors may be used to endorse or promote products derived from
17// this software without specific prior written permission.
18//
19// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
31// Benchmark messages for proto2.
32
33syntax = "proto2";
34
35package benchmarks.proto2;
36option java_package = "com.google.protobuf.benchmarks";
37
38// This is the default, but we specify it here explicitly.
39option optimize_for = SPEED;
40
41option cc_enable_arenas = true;
42
43message GoogleMessage1 {
44  required string field1 = 1;
45  optional string field9 = 9;
46  optional string field18 = 18;
47  optional bool field80 = 80 [default = false];
48  optional bool field81 = 81 [default = true];
49  required int32 field2 = 2;
50  required int32 field3 = 3;
51  optional int32 field280 = 280;
52  optional int32 field6 = 6 [default = 0];
53  optional int64 field22 = 22;
54  optional string field4 = 4;
55  repeated fixed64 field5 = 5;
56  optional bool field59 = 59 [default = false];
57  optional string field7 = 7;
58  optional int32 field16 = 16;
59  optional int32 field130 = 130 [default = 0];
60  optional bool field12 = 12 [default = true];
61  optional bool field17 = 17 [default = true];
62  optional bool field13 = 13 [default = true];
63  optional bool field14 = 14 [default = true];
64  optional int32 field104 = 104 [default = 0];
65  optional int32 field100 = 100 [default = 0];
66  optional int32 field101 = 101 [default = 0];
67  optional string field102 = 102;
68  optional string field103 = 103;
69  optional int32 field29 = 29 [default = 0];
70  optional bool field30 = 30 [default = false];
71  optional int32 field60 = 60 [default = -1];
72  optional int32 field271 = 271 [default = -1];
73  optional int32 field272 = 272 [default = -1];
74  optional int32 field150 = 150;
75  optional int32 field23 = 23 [default = 0];
76  optional bool field24 = 24 [default = false];
77  optional int32 field25 = 25 [default = 0];
78  optional GoogleMessage1SubMessage field15 = 15;
79  optional bool field78 = 78;
80  optional int32 field67 = 67 [default = 0];
81  optional int32 field68 = 68;
82  optional int32 field128 = 128 [default = 0];
83  optional string field129 = 129 [default = "xxxxxxxxxxxxxxxxxxxxx"];
84  optional int32 field131 = 131 [default = 0];
85}
86
87message GoogleMessage1SubMessage {
88  optional int32 field1 = 1 [default = 0];
89  optional int32 field2 = 2 [default = 0];
90  optional int32 field3 = 3 [default = 0];
91  optional string field15 = 15;
92  optional bool field12 = 12 [default = true];
93  optional int64 field13 = 13;
94  optional int64 field14 = 14;
95  optional int32 field16 = 16;
96  optional int32 field19 = 19 [default = 2];
97  optional bool field20 = 20 [default = true];
98  optional bool field28 = 28 [default = true];
99  optional fixed64 field21 = 21;
100  optional int32 field22 = 22;
101  optional bool field23 = 23 [default = false];
102  optional bool field206 = 206 [default = false];
103  optional fixed32 field203 = 203;
104  optional int32 field204 = 204;
105  optional string field205 = 205;
106  optional uint64 field207 = 207;
107  optional uint64 field300 = 300;
108}
109