Skip to content

Commit

Permalink
[Buffer Pool Part1]buffer pool impl in native (#38)
Browse files Browse the repository at this point in the history
* buffer pool impl in native

* Add buffer pool test ut in pipeline
  • Loading branch information
ashione committed Mar 29, 2022
1 parent 7bdc54a commit d75bb8d
Show file tree
Hide file tree
Showing 8 changed files with 1,131 additions and 11 deletions.
73 changes: 63 additions & 10 deletions streaming/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# C/C++ documentation: https://docs.bazel.build/versions/master/be/c-cpp.html

load("@rules_proto_grpc//python:defs.bzl", "python_proto_compile")
load("@com_github_ray_project_ray//bazel:ray.bzl", "COPTS", "copy_to_workspace", "PYX_COPTS", "PYX_SRCS")
load("@com_github_ray_project_ray//bazel:ray.bzl", "COPTS", "PYX_COPTS", "PYX_SRCS", "copy_to_workspace")
load("@rules_python//python:defs.bzl", "py_library")
load("@com_github_grpc_grpc//bazel:cython_library.bzl", "pyx_library")
load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
Expand Down Expand Up @@ -261,6 +261,19 @@ cc_library(
deps = [],
)

cc_library(
name = "streaming_buffer_pool",
srcs = glob(["src/buffer_pool/*.cc"]),
hdrs = glob(["src/buffer_pool/*.h"]),
copts = COPTS,
includes = ["src/"],
visibility = ["//visibility:public"],
deps = [
":streaming_common",
":streaming_util",
],
)

cc_library(
name = "streaming_lib",
srcs = glob([
Expand Down Expand Up @@ -322,7 +335,10 @@ cc_test(
"src/test/ring_buffer_tests.cc",
],
copts = COPTS,
tags = ["team:ant-group", "basic"],
tags = [
"basic",
"team:ant-group",
],
deps = test_common_deps,
)

Expand All @@ -332,7 +348,10 @@ cc_test(
"src/test/barrier_helper_tests.cc",
],
copts = COPTS,
tags = ["team:ant-group", "basic"],
tags = [
"basic",
"team:ant-group",
],
deps = test_common_deps,
)

Expand All @@ -342,7 +361,10 @@ cc_test(
"src/test/message_serialization_tests.cc",
],
copts = COPTS,
tags = ["team:ant-group", "basic"],
tags = [
"basic",
"team:ant-group",
],
deps = test_common_deps,
)

Expand All @@ -352,7 +374,10 @@ cc_test(
"src/test/mock_transfer_tests.cc",
],
copts = COPTS,
tags = ["team:ant-group", "basic"],
tags = [
"basic",
"team:ant-group",
],
deps = test_common_deps,
)

Expand All @@ -362,7 +387,10 @@ cc_test(
"src/test/streaming_util_tests.cc",
],
copts = COPTS,
tags = ["team:ant-group", "basic"],
tags = [
"basic",
"team:ant-group",
],
deps = test_common_deps,
)

Expand All @@ -372,7 +400,10 @@ cc_test(
"src/test/streaming_perf_tests.cc",
],
copts = COPTS,
tags = ["team:ant-group", "basic"],
tags = [
"basic",
"team:ant-group",
],
deps = test_common_deps,
)

Expand All @@ -382,7 +413,10 @@ cc_test(
"src/test/event_service_tests.cc",
],
copts = COPTS,
tags = ["team:ant-group", "basic"],
tags = [
"basic",
"team:ant-group",
],
deps = test_common_deps,
)

Expand All @@ -391,7 +425,10 @@ cc_test(
srcs = [
"src/test/queue_protobuf_tests.cc",
],
tags = ["team:ant-group", "basic"],
tags = [
"basic",
"team:ant-group",
],
deps = test_common_deps,
)

Expand All @@ -401,10 +438,26 @@ cc_test(
"src/test/data_writer_tests.cc",
],
copts = COPTS,
tags = ["team:ant-group", "basic"],
tags = [
"basic",
"team:ant-group",
],
deps = test_common_deps,
)

cc_test(
name = "buffer_pool_tests",
srcs = [
"src/test/buffer_pool_tests.cc",
],
copts = COPTS,
tags = [
"basic",
"team:ant-group",
],
deps = test_common_deps + [":streaming_buffer_pool"],
)

python_proto_compile(
name = "streaming_py_proto",
deps = [":streaming_proto"],
Expand Down
2 changes: 1 addition & 1 deletion streaming/buildtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function test_streaming_cpp()
#bazel test //:all --test_filter=basic
# NOTE(lingxuan.zlx): unsupported host instruction of bazel on github workflow
bazel test "streaming_message_ring_buffer_tests" "barrier_helper_tests" "streaming_message_serialization_tests" "streaming_mock_transfer" \
"streaming_util_tests" "streaming_perf_tests" "event_service_tests" "queue_protobuf_tests" "data_writer_tests"
"streaming_util_tests" "streaming_perf_tests" "event_service_tests" "queue_protobuf_tests" "data_writer_tests" "buffer_pool_tests"
exit $?

popd || exit
Expand Down
Loading

0 comments on commit d75bb8d

Please sign in to comment.