@@ -3,17 +3,44 @@ load("@com_google_protobuf//bazel:proto_library.bzl", "proto_library")
33
44package (default_visibility = ["//visibility:private" ])
55
6+ NUM_MESSAGES = 10
7+
68[proto_library (
79 name = "Message%d_proto" % id ,
810 testonly = True ,
911 srcs = ["Message%d.proto" % id ],
10- ) for id in range (0 , 10 )]
12+ ) for id in range (0 , NUM_MESSAGES )]
13+
14+ cc_library (
15+ name = "receiver" ,
16+ testonly = True ,
17+ hdrs = ["receiver.h" ],
18+ deps = [
19+ "@com_google_absl//absl/strings:cord" ,
20+ "@com_google_absl//absl/strings:string_view" ,
21+ "@com_google_benchmark//:benchmark" ,
22+ ],
23+ )
1124
1225[cc_proto_library (
1326 name = "Message%d_cc_proto" % id ,
1427 testonly = True ,
1528 deps = [":Message%d_proto" % id ],
16- ) for id in range (0 , 10 )]
29+ ) for id in range (0 , NUM_MESSAGES )]
30+
31+ [cc_library (
32+ name = "access_message_%d" % id ,
33+ testonly = True ,
34+ srcs = ["access_message%d.cc" % id ],
35+ hdrs = [
36+ "access_message%d.h" % id ,
37+ ],
38+ deps = [
39+ ":Message%d_cc_proto" % id ,
40+ ":receiver" ,
41+ "@com_google_absl//absl/log:check" ,
42+ ],
43+ ) for id in range (0 , NUM_MESSAGES )]
1744
1845cc_library (
1946 name = "proto_benchmark_lib" ,
@@ -22,12 +49,16 @@ cc_library(
2249 "benchmark.cc" ,
2350 "lifecycle.cc" ,
2451 ],
25- hdrs = ["access_message%d.h" % id for id in range (0 , 10 )] + [
26- "lifecycle.h" ,
27- "receiver.h" ,
28- ],
52+ hdrs = ["lifecycle.h" ],
2953 visibility = ["//fleetbench:__pkg__" ],
30- deps = [":Message%d_cc_proto" % id for id in range (0 , 10 )] + [
54+ deps = [
55+ ":Message%d_cc_proto" % id
56+ for id in range (0 , NUM_MESSAGES )
57+ ] + [
58+ ":access_message_%d" % id
59+ for id in range (0 , NUM_MESSAGES )
60+ ] + [
61+ ":receiver" ,
3162 "//fleetbench:dynamic_registrar" ,
3263 "//fleetbench:productivity_reporter" ,
3364 "//fleetbench/common" ,
0 commit comments