[memory-usage] Propagate experiments through memory-usage test to client/server (#33206)

Will be used to evaluate experiment effects on memory usage once they're
toggled on.

<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
pull/33213/head
Craig Tiller 2 years ago committed by GitHub
parent 3671350d92
commit 4303a67e8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      test/core/memory_usage/memory_usage_test.cc

@ -36,6 +36,7 @@
#include <grpc/support/log.h>
#include <grpc/support/time.h>
#include "src/core/lib/config/config_vars.h"
#include "src/core/lib/gprpp/host_port.h"
#include "test/core/util/port.h"
#include "test/core/util/subprocess.h"
@ -82,7 +83,9 @@ int RunCallBenchmark(char* root, std::vector<std::string> server_scenario_flags,
std::vector<std::string> server_flags = {
absl::StrCat(root, "/memory_usage_server",
gpr_subprocess_binary_extension()),
"--bind", grpc_core::JoinHostPort("::", port)};
"--grpc_experiments",
std::string(grpc_core::ConfigVars::Get().Experiments()), "--bind",
grpc_core::JoinHostPort("::", port)};
// Add scenario-specific server flags to the end of the server_flags
absl::c_move(server_scenario_flags, std::back_inserter(server_flags));
Subprocess svr(server_flags);
@ -91,7 +94,10 @@ int RunCallBenchmark(char* root, std::vector<std::string> server_scenario_flags,
std::vector<std::string> client_flags = {
absl::StrCat(root, "/memory_usage_client",
gpr_subprocess_binary_extension()),
"--target", grpc_core::JoinHostPort("127.0.0.1", port),
"--target",
grpc_core::JoinHostPort("127.0.0.1", port),
"--grpc_experiments",
std::string(grpc_core::ConfigVars::Get().Experiments()),
absl::StrCat("--warmup=", 10000),
absl::StrCat("--benchmark=", absl::GetFlag(FLAGS_size))};
// Add scenario-specific client flags to the end of the client_flags

Loading…
Cancel
Save