Merge pull request #7744 from Yannic/bazel_bench
[bazel] Add BUILD files for benchmark protospull/8407/head
commit
3a127ae4fb
9 changed files with 375 additions and 0 deletions
@ -0,0 +1,65 @@ |
||||
load("@rules_cc//cc:defs.bzl", "cc_proto_library") |
||||
load("@rules_java//java:defs.bzl", "java_proto_library") |
||||
load("@rules_proto//proto:defs.bzl", "proto_library") |
||||
|
||||
proto_library( |
||||
name = "benchmarks_proto", |
||||
srcs = [ |
||||
"benchmarks.proto", |
||||
], |
||||
strip_import_prefix = "/benchmarks", |
||||
visibility = [ |
||||
"//benchmarks:__subpackages__", |
||||
], |
||||
) |
||||
|
||||
cc_proto_library( |
||||
name = "benchmarks_cc_proto", |
||||
visibility = [ |
||||
"//benchmarks:__subpackages__", |
||||
], |
||||
deps = [ |
||||
"benchmarks_proto", |
||||
], |
||||
) |
||||
|
||||
java_proto_library( |
||||
name = "benchmarks_java_proto", |
||||
visibility = [ |
||||
"//benchmarks:__subpackages__", |
||||
], |
||||
deps = [ |
||||
"benchmarks_proto", |
||||
], |
||||
) |
||||
|
||||
proto_library( |
||||
name = "google_size_proto", |
||||
srcs = [ |
||||
"google_size.proto", |
||||
], |
||||
strip_import_prefix = "/benchmarks", |
||||
visibility = [ |
||||
"//benchmarks:__subpackages__", |
||||
], |
||||
) |
||||
|
||||
cc_proto_library( |
||||
name = "google_size_cc_proto", |
||||
visibility = [ |
||||
"//benchmarks:__subpackages__", |
||||
], |
||||
deps = [ |
||||
"google_size_proto", |
||||
], |
||||
) |
||||
|
||||
java_proto_library( |
||||
name = "google_size_java_proto", |
||||
visibility = [ |
||||
"//benchmarks:__subpackages__", |
||||
], |
||||
deps = [ |
||||
"google_size_proto", |
||||
], |
||||
) |
@ -0,0 +1,15 @@ |
||||
load("@rules_cc//cc:defs.bzl", "cc_binary") |
||||
|
||||
cc_binary( |
||||
name = "cpp", |
||||
srcs = [ |
||||
"cpp_benchmark.cc", |
||||
], |
||||
tags = ["benchmark"], |
||||
deps = [ |
||||
"//:protobuf", |
||||
"//benchmarks:benchmarks_cc_proto", |
||||
"//benchmarks/datasets:cc_protos", |
||||
"@com_github_google_benchmark//:benchmark_main", |
||||
], |
||||
) |
@ -0,0 +1,59 @@ |
||||
load("@rules_cc//cc:defs.bzl", "cc_library") |
||||
load("@rules_java//java:defs.bzl", "java_library") |
||||
load("@rules_proto//proto:defs.bzl", "proto_library") |
||||
|
||||
filegroup( |
||||
name = "datasets", |
||||
srcs = [ |
||||
"//benchmarks/datasets/google_message1/proto2:datasets", |
||||
"//benchmarks/datasets/google_message1/proto3:datasets", |
||||
"//benchmarks/datasets/google_message2:datasets", |
||||
"//benchmarks/datasets/google_message3:datasets", |
||||
"//benchmarks/datasets/google_message4:datasets", |
||||
], |
||||
visibility = [ |
||||
"//benchmarks:__subpackages__", |
||||
], |
||||
) |
||||
|
||||
proto_library( |
||||
name = "protos", |
||||
visibility = [ |
||||
"//benchmarks:__subpackages__", |
||||
], |
||||
deps = [ |
||||
"//benchmarks/datasets/google_message1/proto2:benchmark_message1_proto2_proto", |
||||
"//benchmarks/datasets/google_message1/proto3:benchmark_message1_proto3_proto", |
||||
"//benchmarks/datasets/google_message2:benchmark_message2_proto", |
||||
"//benchmarks/datasets/google_message3:benchmark_message3_proto", |
||||
"//benchmarks/datasets/google_message4:benchmark_message4_proto", |
||||
], |
||||
) |
||||
|
||||
cc_library( |
||||
name = "cc_protos", |
||||
visibility = [ |
||||
"//benchmarks:__subpackages__", |
||||
], |
||||
deps = [ |
||||
"//benchmarks/datasets/google_message1/proto2:benchmark_message1_proto2_cc_proto", |
||||
"//benchmarks/datasets/google_message1/proto3:benchmark_message1_proto3_cc_proto", |
||||
"//benchmarks/datasets/google_message2:benchmark_message2_cc_proto", |
||||
"//benchmarks/datasets/google_message3:benchmark_message3_cc_proto", |
||||
"//benchmarks/datasets/google_message4:benchmark_message4_cc_proto", |
||||
], |
||||
) |
||||
|
||||
java_library( |
||||
name = "java_protos", |
||||
visibility = [ |
||||
"//benchmarks:__subpackages__", |
||||
], |
||||
exports = [ |
||||
"//benchmarks/datasets/google_message1/proto2:benchmark_message1_proto2_java_proto", |
||||
"//benchmarks/datasets/google_message1/proto3:benchmark_message1_proto3_java_proto", |
||||
"//benchmarks/datasets/google_message2:benchmark_message2_java_proto", |
||||
"//benchmarks/datasets/google_message3:benchmark_message3_java_proto", |
||||
"//benchmarks/datasets/google_message4:benchmark_message4_java_proto", |
||||
], |
||||
) |
@ -0,0 +1,44 @@ |
||||
load("@rules_cc//cc:defs.bzl", "cc_proto_library") |
||||
load("@rules_java//java:defs.bzl", "java_proto_library") |
||||
load("@rules_proto//proto:defs.bzl", "proto_library") |
||||
|
||||
filegroup( |
||||
name = "datasets", |
||||
srcs = [ |
||||
"dataset.google_message1_proto2.pb", |
||||
], |
||||
visibility = [ |
||||
"//benchmarks/datasets:__pkg__", |
||||
], |
||||
) |
||||
|
||||
proto_library( |
||||
name = "benchmark_message1_proto2_proto", |
||||
srcs = [ |
||||
"benchmark_message1_proto2.proto", |
||||
], |
||||
strip_import_prefix = "/benchmarks", |
||||
visibility = [ |
||||
"//benchmarks/datasets:__pkg__", |
||||
], |
||||
) |
||||
|
||||
cc_proto_library( |
||||
name = "benchmark_message1_proto2_cc_proto", |
||||
visibility = [ |
||||
"//benchmarks/datasets:__pkg__", |
||||
], |
||||
deps = [ |
||||
"benchmark_message1_proto2_proto", |
||||
], |
||||
) |
||||
|
||||
java_proto_library( |
||||
name = "benchmark_message1_proto2_java_proto", |
||||
visibility = [ |
||||
"//benchmarks/datasets:__pkg__", |
||||
], |
||||
deps = [ |
||||
"benchmark_message1_proto2_proto", |
||||
], |
||||
) |
@ -0,0 +1,44 @@ |
||||
load("@rules_cc//cc:defs.bzl", "cc_proto_library") |
||||
load("@rules_java//java:defs.bzl", "java_proto_library") |
||||
load("@rules_proto//proto:defs.bzl", "proto_library") |
||||
|
||||
filegroup( |
||||
name = "datasets", |
||||
srcs = [ |
||||
"dataset.google_message1_proto3.pb", |
||||
], |
||||
visibility = [ |
||||
"//benchmarks/datasets:__pkg__", |
||||
], |
||||
) |
||||
|
||||
proto_library( |
||||
name = "benchmark_message1_proto3_proto", |
||||
srcs = [ |
||||
"benchmark_message1_proto3.proto", |
||||
], |
||||
strip_import_prefix = "/benchmarks", |
||||
visibility = [ |
||||
"//benchmarks/datasets:__pkg__", |
||||
], |
||||
) |
||||
|
||||
cc_proto_library( |
||||
name = "benchmark_message1_proto3_cc_proto", |
||||
visibility = [ |
||||
"//benchmarks/datasets:__pkg__", |
||||
], |
||||
deps = [ |
||||
"benchmark_message1_proto3_proto", |
||||
], |
||||
) |
||||
|
||||
java_proto_library( |
||||
name = "benchmark_message1_proto3_java_proto", |
||||
visibility = [ |
||||
"//benchmarks/datasets:__pkg__", |
||||
], |
||||
deps = [ |
||||
"benchmark_message1_proto3_proto", |
||||
], |
||||
) |
@ -0,0 +1,44 @@ |
||||
load("@rules_cc//cc:defs.bzl", "cc_proto_library") |
||||
load("@rules_java//java:defs.bzl", "java_proto_library") |
||||
load("@rules_proto//proto:defs.bzl", "proto_library") |
||||
|
||||
filegroup( |
||||
name = "datasets", |
||||
srcs = [ |
||||
"dataset.google_message2.pb", |
||||
], |
||||
visibility = [ |
||||
"//benchmarks/datasets:__pkg__", |
||||
], |
||||
) |
||||
|
||||
proto_library( |
||||
name = "benchmark_message2_proto", |
||||
srcs = [ |
||||
"benchmark_message2.proto", |
||||
], |
||||
strip_import_prefix = "/benchmarks", |
||||
visibility = [ |
||||
"//benchmarks/datasets:__pkg__", |
||||
], |
||||
) |
||||
|
||||
cc_proto_library( |
||||
name = "benchmark_message2_cc_proto", |
||||
visibility = [ |
||||
"//benchmarks/datasets:__pkg__", |
||||
], |
||||
deps = [ |
||||
"benchmark_message2_proto", |
||||
], |
||||
) |
||||
|
||||
java_proto_library( |
||||
name = "benchmark_message2_java_proto", |
||||
visibility = [ |
||||
"//benchmarks/datasets:__pkg__", |
||||
], |
||||
deps = [ |
||||
"benchmark_message2_proto", |
||||
], |
||||
) |
@ -0,0 +1,50 @@ |
||||
load("@rules_cc//cc:defs.bzl", "cc_proto_library") |
||||
load("@rules_java//java:defs.bzl", "java_proto_library") |
||||
load("@rules_proto//proto:defs.bzl", "proto_library") |
||||
|
||||
filegroup( |
||||
name = "datasets", |
||||
srcs = [], |
||||
visibility = [ |
||||
"//benchmarks/datasets:__pkg__", |
||||
], |
||||
) |
||||
|
||||
proto_library( |
||||
name = "benchmark_message3_proto", |
||||
srcs = [ |
||||
"benchmark_message3.proto", |
||||
"benchmark_message3_1.proto", |
||||
"benchmark_message3_2.proto", |
||||
"benchmark_message3_3.proto", |
||||
"benchmark_message3_4.proto", |
||||
"benchmark_message3_5.proto", |
||||
"benchmark_message3_6.proto", |
||||
"benchmark_message3_7.proto", |
||||
"benchmark_message3_8.proto", |
||||
], |
||||
strip_import_prefix = "/benchmarks", |
||||
visibility = [ |
||||
"//benchmarks/datasets:__pkg__", |
||||
], |
||||
) |
||||
|
||||
cc_proto_library( |
||||
name = "benchmark_message3_cc_proto", |
||||
visibility = [ |
||||
"//benchmarks/datasets:__pkg__", |
||||
], |
||||
deps = [ |
||||
"benchmark_message3_proto", |
||||
], |
||||
) |
||||
|
||||
java_proto_library( |
||||
name = "benchmark_message3_java_proto", |
||||
visibility = [ |
||||
"//benchmarks/datasets:__pkg__", |
||||
], |
||||
deps = [ |
||||
"benchmark_message3_proto", |
||||
], |
||||
) |
@ -0,0 +1,45 @@ |
||||
load("@rules_cc//cc:defs.bzl", "cc_proto_library") |
||||
load("@rules_java//java:defs.bzl", "java_proto_library") |
||||
load("@rules_proto//proto:defs.bzl", "proto_library") |
||||
|
||||
filegroup( |
||||
name = "datasets", |
||||
srcs = [], |
||||
visibility = [ |
||||
"//benchmarks/datasets:__pkg__", |
||||
], |
||||
) |
||||
|
||||
proto_library( |
||||
name = "benchmark_message4_proto", |
||||
srcs = [ |
||||
"benchmark_message4.proto", |
||||
"benchmark_message4_1.proto", |
||||
"benchmark_message4_2.proto", |
||||
"benchmark_message4_3.proto", |
||||
], |
||||
strip_import_prefix = "/benchmarks", |
||||
visibility = [ |
||||
"//benchmarks/datasets:__pkg__", |
||||
], |
||||
) |
||||
|
||||
cc_proto_library( |
||||
name = "benchmark_message4_cc_proto", |
||||
visibility = [ |
||||
"//benchmarks/datasets:__pkg__", |
||||
], |
||||
deps = [ |
||||
"benchmark_message4_proto", |
||||
], |
||||
) |
||||
|
||||
java_proto_library( |
||||
name = "benchmark_message4_java_proto", |
||||
visibility = [ |
||||
"//benchmarks/datasets:__pkg__", |
||||
], |
||||
deps = [ |
||||
"benchmark_message4_proto", |
||||
], |
||||
) |
Loading…
Reference in new issue