Skip to content

Commit 1c580b2

Browse files
rjogradycopybara-github
authored andcommitted
First CL to move accessors out of header and into cc files.
PiperOrigin-RevId: 766756412 Change-Id: Ib55cb40a3aad5606cb4c56628cdede7169df21d6
1 parent 60c4e72 commit 1c580b2

File tree

11 files changed

+208
-7
lines changed

11 files changed

+208
-7
lines changed

fleetbench/proto/BUILD

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,44 @@ load("@com_google_protobuf//bazel:proto_library.bzl", "proto_library")
33

44
package(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

1845
cc_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",
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright 2025 The Fleetbench Authors
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License" );
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an " AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// WARNING: DO NOT EDIT! This file is auto-generated.
16+
17+
#include "fleetbench/proto/access_message0.h"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright 2025 The Fleetbench Authors
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License" );
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an " AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// WARNING: DO NOT EDIT! This file is auto-generated.
16+
17+
#include "fleetbench/proto/access_message1.h"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright 2025 The Fleetbench Authors
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License" );
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an " AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// WARNING: DO NOT EDIT! This file is auto-generated.
16+
17+
#include "fleetbench/proto/access_message2.h"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright 2025 The Fleetbench Authors
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License" );
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an " AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// WARNING: DO NOT EDIT! This file is auto-generated.
16+
17+
#include "fleetbench/proto/access_message3.h"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright 2025 The Fleetbench Authors
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License" );
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an " AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// WARNING: DO NOT EDIT! This file is auto-generated.
16+
17+
#include "fleetbench/proto/access_message4.h"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright 2025 The Fleetbench Authors
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License" );
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an " AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// WARNING: DO NOT EDIT! This file is auto-generated.
16+
17+
#include "fleetbench/proto/access_message5.h"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright 2025 The Fleetbench Authors
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License" );
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an " AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// WARNING: DO NOT EDIT! This file is auto-generated.
16+
17+
#include "fleetbench/proto/access_message6.h"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright 2025 The Fleetbench Authors
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License" );
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an " AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// WARNING: DO NOT EDIT! This file is auto-generated.
16+
17+
#include "fleetbench/proto/access_message7.h"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright 2025 The Fleetbench Authors
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License" );
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an " AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// WARNING: DO NOT EDIT! This file is auto-generated.
16+
17+
#include "fleetbench/proto/access_message8.h"

0 commit comments

Comments
 (0)