The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#) https://grpc.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

104 lines
2.5 KiB

Rewrite memory quota management in C++ with Promises library (#27327) * first pass new memory quota * forget the ee stuff - it should be a wrapper on top * beginning to finalize * compiles * basic tests pass * fixes * Automated change: Fix sanity tests * merge * Automated change: Fix sanity tests * add rebind test * flesh out the rest * Automated change: Fix sanity tests * add increase * prog * Automated change: Fix sanity tests * allow cancellation during run * fixes * clang-format * better allocation strategy * better allocation strategy * Automated change: Fix sanity tests * Update memory_quota.cc * format * better comment * remove block size - this is probably unnecessary complexity * fmt * cleanup * size_t * Automated change: Fix sanity tests * fixes * move makeslice into memoryallocator * move makeslice into memoryallocator * add container allocator, tests * Automated change: Fix sanity tests * fixes * Automated change: Fix sanity tests * add some docs * Automated change: Fix sanity tests * fix doc * comment vector * Automated change: Fix sanity tests * fixes * ditch the thread * exec_ctx integration * Automated change: Fix sanity tests * progress! * fuzzer * initial_corpora * Automated change: Fix sanity tests * bigger_objects * better-fuzzer * add stress test * Automated change: Fix sanity tests * Remove unused header * Iwyu * Automated change: Fix sanity tests * Portability fix, comment * Fix unused arg * Remove unused names * Removed unused name * Automated change: Fix sanity tests * windows * Automated change: Fix sanity tests * cleanup * fix-mac * cleanup, eliminate atomicbarrier * exclude some platforms * Automated change: Fix sanity tests Co-authored-by: ctiller <ctiller@users.noreply.github.com>
3 years ago
# Copyright 2021 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_package")
load("//test/core/util:grpc_fuzzer.bzl", "grpc_proto_fuzzer")
Rewrite memory quota management in C++ with Promises library (#27327) * first pass new memory quota * forget the ee stuff - it should be a wrapper on top * beginning to finalize * compiles * basic tests pass * fixes * Automated change: Fix sanity tests * merge * Automated change: Fix sanity tests * add rebind test * flesh out the rest * Automated change: Fix sanity tests * add increase * prog * Automated change: Fix sanity tests * allow cancellation during run * fixes * clang-format * better allocation strategy * better allocation strategy * Automated change: Fix sanity tests * Update memory_quota.cc * format * better comment * remove block size - this is probably unnecessary complexity * fmt * cleanup * size_t * Automated change: Fix sanity tests * fixes * move makeslice into memoryallocator * move makeslice into memoryallocator * add container allocator, tests * Automated change: Fix sanity tests * fixes * Automated change: Fix sanity tests * add some docs * Automated change: Fix sanity tests * fix doc * comment vector * Automated change: Fix sanity tests * fixes * ditch the thread * exec_ctx integration * Automated change: Fix sanity tests * progress! * fuzzer * initial_corpora * Automated change: Fix sanity tests * bigger_objects * better-fuzzer * add stress test * Automated change: Fix sanity tests * Remove unused header * Iwyu * Automated change: Fix sanity tests * Portability fix, comment * Fix unused arg * Remove unused names * Removed unused name * Automated change: Fix sanity tests * windows * Automated change: Fix sanity tests * cleanup * fix-mac * cleanup, eliminate atomicbarrier * exclude some platforms * Automated change: Fix sanity tests Co-authored-by: ctiller <ctiller@users.noreply.github.com>
3 years ago
licenses(["notice"])
grpc_package(name = "test/core/resource_quota")
Rewrite memory quota management in C++ with Promises library (#27327) * first pass new memory quota * forget the ee stuff - it should be a wrapper on top * beginning to finalize * compiles * basic tests pass * fixes * Automated change: Fix sanity tests * merge * Automated change: Fix sanity tests * add rebind test * flesh out the rest * Automated change: Fix sanity tests * add increase * prog * Automated change: Fix sanity tests * allow cancellation during run * fixes * clang-format * better allocation strategy * better allocation strategy * Automated change: Fix sanity tests * Update memory_quota.cc * format * better comment * remove block size - this is probably unnecessary complexity * fmt * cleanup * size_t * Automated change: Fix sanity tests * fixes * move makeslice into memoryallocator * move makeslice into memoryallocator * add container allocator, tests * Automated change: Fix sanity tests * fixes * Automated change: Fix sanity tests * add some docs * Automated change: Fix sanity tests * fix doc * comment vector * Automated change: Fix sanity tests * fixes * ditch the thread * exec_ctx integration * Automated change: Fix sanity tests * progress! * fuzzer * initial_corpora * Automated change: Fix sanity tests * bigger_objects * better-fuzzer * add stress test * Automated change: Fix sanity tests * Remove unused header * Iwyu * Automated change: Fix sanity tests * Portability fix, comment * Fix unused arg * Remove unused names * Removed unused name * Automated change: Fix sanity tests * windows * Automated change: Fix sanity tests * cleanup * fix-mac * cleanup, eliminate atomicbarrier * exclude some platforms * Automated change: Fix sanity tests Co-authored-by: ctiller <ctiller@users.noreply.github.com>
3 years ago
grpc_cc_library(
name = "call_checker",
testonly = True,
hdrs = ["call_checker.h"],
language = "c++",
deps = ["//:gpr"],
)
Rewrite memory quota management in C++ with Promises library (#27327) * first pass new memory quota * forget the ee stuff - it should be a wrapper on top * beginning to finalize * compiles * basic tests pass * fixes * Automated change: Fix sanity tests * merge * Automated change: Fix sanity tests * add rebind test * flesh out the rest * Automated change: Fix sanity tests * add increase * prog * Automated change: Fix sanity tests * allow cancellation during run * fixes * clang-format * better allocation strategy * better allocation strategy * Automated change: Fix sanity tests * Update memory_quota.cc * format * better comment * remove block size - this is probably unnecessary complexity * fmt * cleanup * size_t * Automated change: Fix sanity tests * fixes * move makeslice into memoryallocator * move makeslice into memoryallocator * add container allocator, tests * Automated change: Fix sanity tests * fixes * Automated change: Fix sanity tests * add some docs * Automated change: Fix sanity tests * fix doc * comment vector * Automated change: Fix sanity tests * fixes * ditch the thread * exec_ctx integration * Automated change: Fix sanity tests * progress! * fuzzer * initial_corpora * Automated change: Fix sanity tests * bigger_objects * better-fuzzer * add stress test * Automated change: Fix sanity tests * Remove unused header * Iwyu * Automated change: Fix sanity tests * Portability fix, comment * Fix unused arg * Remove unused names * Removed unused name * Automated change: Fix sanity tests * windows * Automated change: Fix sanity tests * cleanup * fix-mac * cleanup, eliminate atomicbarrier * exclude some platforms * Automated change: Fix sanity tests Co-authored-by: ctiller <ctiller@users.noreply.github.com>
3 years ago
grpc_cc_test(
name = "memory_quota_test",
srcs = ["memory_quota_test.cc"],
external_deps = [
"gtest",
],
language = "c++",
uses_polling = False,
deps = [
"call_checker",
Rewrite memory quota management in C++ with Promises library (#27327) * first pass new memory quota * forget the ee stuff - it should be a wrapper on top * beginning to finalize * compiles * basic tests pass * fixes * Automated change: Fix sanity tests * merge * Automated change: Fix sanity tests * add rebind test * flesh out the rest * Automated change: Fix sanity tests * add increase * prog * Automated change: Fix sanity tests * allow cancellation during run * fixes * clang-format * better allocation strategy * better allocation strategy * Automated change: Fix sanity tests * Update memory_quota.cc * format * better comment * remove block size - this is probably unnecessary complexity * fmt * cleanup * size_t * Automated change: Fix sanity tests * fixes * move makeslice into memoryallocator * move makeslice into memoryallocator * add container allocator, tests * Automated change: Fix sanity tests * fixes * Automated change: Fix sanity tests * add some docs * Automated change: Fix sanity tests * fix doc * comment vector * Automated change: Fix sanity tests * fixes * ditch the thread * exec_ctx integration * Automated change: Fix sanity tests * progress! * fuzzer * initial_corpora * Automated change: Fix sanity tests * bigger_objects * better-fuzzer * add stress test * Automated change: Fix sanity tests * Remove unused header * Iwyu * Automated change: Fix sanity tests * Portability fix, comment * Fix unused arg * Remove unused names * Removed unused name * Automated change: Fix sanity tests * windows * Automated change: Fix sanity tests * cleanup * fix-mac * cleanup, eliminate atomicbarrier * exclude some platforms * Automated change: Fix sanity tests Co-authored-by: ctiller <ctiller@users.noreply.github.com>
3 years ago
"//:memory_quota",
"//test/core/util:grpc_suppressions",
],
)
grpc_cc_test(
name = "thread_quota_test",
srcs = ["thread_quota_test.cc"],
external_deps = [
"gtest",
],
language = "c++",
uses_polling = False,
deps = [
"//:thread_quota",
"//test/core/util:grpc_suppressions",
],
)
grpc_cc_test(
name = "resource_quota_test",
srcs = ["resource_quota_test.cc"],
external_deps = [
"gtest",
],
language = "c++",
uses_polling = False,
deps = [
"//:resource_quota",
"//test/core/util:grpc_suppressions",
],
)
grpc_cc_test(
name = "memory_quota_stress_test",
srcs = ["memory_quota_stress_test.cc"],
language = "c++",
# We only run this test under Linux, and really only care about the
# TSAN results.
tags = [
"no_mac",
"no_windows",
],
uses_polling = False,
deps = [
"//:memory_quota",
"//test/core/util:grpc_suppressions",
],
)
grpc_proto_fuzzer(
name = "memory_quota_fuzzer",
srcs = ["memory_quota_fuzzer.cc"],
corpus = "memory_quota_fuzzer_corpus",
language = "C++",
proto = "memory_quota_fuzzer.proto",
tags = ["no_windows"],
uses_polling = False,
deps = [
"call_checker",
Rewrite memory quota management in C++ with Promises library (#27327) * first pass new memory quota * forget the ee stuff - it should be a wrapper on top * beginning to finalize * compiles * basic tests pass * fixes * Automated change: Fix sanity tests * merge * Automated change: Fix sanity tests * add rebind test * flesh out the rest * Automated change: Fix sanity tests * add increase * prog * Automated change: Fix sanity tests * allow cancellation during run * fixes * clang-format * better allocation strategy * better allocation strategy * Automated change: Fix sanity tests * Update memory_quota.cc * format * better comment * remove block size - this is probably unnecessary complexity * fmt * cleanup * size_t * Automated change: Fix sanity tests * fixes * move makeslice into memoryallocator * move makeslice into memoryallocator * add container allocator, tests * Automated change: Fix sanity tests * fixes * Automated change: Fix sanity tests * add some docs * Automated change: Fix sanity tests * fix doc * comment vector * Automated change: Fix sanity tests * fixes * ditch the thread * exec_ctx integration * Automated change: Fix sanity tests * progress! * fuzzer * initial_corpora * Automated change: Fix sanity tests * bigger_objects * better-fuzzer * add stress test * Automated change: Fix sanity tests * Remove unused header * Iwyu * Automated change: Fix sanity tests * Portability fix, comment * Fix unused arg * Remove unused names * Removed unused name * Automated change: Fix sanity tests * windows * Automated change: Fix sanity tests * cleanup * fix-mac * cleanup, eliminate atomicbarrier * exclude some platforms * Automated change: Fix sanity tests Co-authored-by: ctiller <ctiller@users.noreply.github.com>
3 years ago
"//:memory_quota",
"//test/core/util:grpc_test_util",
],
)