-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathbenchmarks.proto
67 lines (62 loc) · 1.12 KB
/
benchmarks.proto
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
syntax = "proto3";
message Sub {
int32 a = 1;
string b = 2;
double xxx = 3;
string zzz = 5;
int64 c = 6;
uint32 d = 7;
uint64 e = 8;
sint64 f = 9;
bytes bbb = 10;
int32 aaa = 11;
float fff = 12;
repeated fixed64 g = 13;
repeated sfixed32 h = 14;
repeated double i = 15;
fixed32 k = 17;
sfixed64 l = 18;
bytes m = 19;
repeated bool n = 20;
repeated E o = 21;
E r = 24;
repeated uint32 u = 27;
repeated sint32 w = 28;
repeated int64 x = 29;
repeated uint64 y = 30;
sint32 z = 10001;
}
enum E {
FOO = 0;
BAR = 1;
BAZ = 2;
// :protobuf seems to not be compliant with the recommanded serialization
// and produces many warnings
// NEG = -1;
}
message Msg {
E d = 1;
bool e = 2;
Sub f = 3;
repeated int32 g = 4;
double h = 5;
repeated float i = 6;
repeated Sub j = 7;
map<int32, string> k = 8;
map<string, double> l = 9;
oneof m {
string n = 10;
Sub o = 11;
}
map<int32, E> p = 12;
repeated sint64 a = 27;
repeated fixed32 b = 28;
repeated sfixed64 c = 29;
}
message Upper {
Msg msg = 1;
map<string, Msg> map = 2;
Empty empty = 3;
}
message Empty {
}