use new perf proto options in c++

pull/4156/head
Jan Tattermusch 9 years ago
parent 18ce9d65ef
commit c5ebbd5b8f
  1. 1
      test/cpp/qps/async_streaming_ping_pong_test.cc
  2. 1
      test/cpp/qps/async_unary_ping_pong_test.cc
  3. 2
      test/cpp/qps/driver.cc
  4. 7
      test/cpp/qps/histogram.h
  5. 6
      test/cpp/qps/qps_driver.cc
  6. 1
      test/cpp/qps/qps_openloop_test.cc
  7. 1
      test/cpp/qps/qps_test.cc
  8. 1
      test/cpp/qps/qps_test_with_poll.cc
  9. 1
      test/cpp/qps/secure_sync_unary_ping_pong_test.cc
  10. 2
      test/cpp/qps/server_async.cc
  11. 2
      test/cpp/qps/server_sync.cc
  12. 1
      test/cpp/qps/sync_streaming_ping_pong_test.cc
  13. 1
      test/cpp/qps/sync_unary_ping_pong_test.cc

@ -58,6 +58,7 @@ static void RunAsyncStreamingPingPong() {
ServerConfig server_config;
server_config.set_server_type(ASYNC_SERVER);
server_config.set_host("localhost");
server_config.set_async_server_threads(1);
const auto result =

@ -58,6 +58,7 @@ static void RunAsyncUnaryPingPong() {
ServerConfig server_config;
server_config.set_server_type(ASYNC_SERVER);
server_config.set_host("localhost");
server_config.set_async_server_threads(1);
const auto result =

@ -110,7 +110,7 @@ std::unique_ptr<ScenarioResult> RunScenario(
list<ClientContext> contexts;
// To be added to the result, containing the final configuration used for
// client and config (incluiding host, etc.)
// client and config (including host, etc.)
ClientConfig result_client_config;
ServerConfig result_server_config;

@ -42,7 +42,9 @@ namespace testing {
class Histogram {
public:
Histogram() : impl_(gpr_histogram_create(0.01, 60e9)) {}
// TODO: look into making histogram params not hardcoded for C++
Histogram() : impl_(gpr_histogram_create(default_resolution(),
default_max_possible())) {}
~Histogram() {
if (impl_) gpr_histogram_destroy(impl_);
}
@ -73,6 +75,9 @@ class Histogram {
p.sum_of_squares(), p.count());
}
static double default_resolution() { return 0.01; }
static double default_max_possible() { return 60e9; }
private:
Histogram(const Histogram&);
Histogram& operator=(const Histogram&);

@ -137,8 +137,14 @@ static void QpsDriver() {
// No further load parameters to set up for closed loop
}
client_config.mutable_histogram_params()->
set_resolution(Histogram::default_resolution());
client_config.mutable_histogram_params()->
set_max_possible(Histogram::default_max_possible());
ServerConfig server_config;
server_config.set_server_type(server_type);
server_config.set_host("localhost");
server_config.set_async_server_threads(FLAGS_async_server_threads);
if (FLAGS_secure_test) {

@ -59,6 +59,7 @@ static void RunQPS() {
ServerConfig server_config;
server_config.set_server_type(ASYNC_SERVER);
server_config.set_host("localhost");
server_config.set_async_server_threads(4);
const auto result =

@ -58,6 +58,7 @@ static void RunQPS() {
ServerConfig server_config;
server_config.set_server_type(ASYNC_SERVER);
server_config.set_host("localhost");
server_config.set_async_server_threads(8);
const auto result =

@ -62,6 +62,7 @@ static void RunQPS() {
ServerConfig server_config;
server_config.set_server_type(ASYNC_SERVER);
server_config.set_host("localhost");
server_config.set_async_server_threads(4);
const auto result =

@ -57,6 +57,7 @@ static void RunSynchronousUnaryPingPong() {
ServerConfig server_config;
server_config.set_server_type(SYNC_SERVER);
server_config.set_host("localhost");
// Set up security params
SecurityParams security;

@ -60,7 +60,7 @@ class AsyncQpsServerTest : public Server {
explicit AsyncQpsServerTest(const ServerConfig &config) : Server(config) {
char *server_address = NULL;
gpr_join_host_port(&server_address, "::", port());
gpr_join_host_port(&server_address, config.host().c_str(), port());
ServerBuilder builder;
builder.AddListeningPort(server_address,

@ -89,7 +89,7 @@ class SynchronousServer GRPC_FINAL : public grpc::testing::Server {
char* server_address = NULL;
gpr_join_host_port(&server_address, "::", port());
gpr_join_host_port(&server_address, config.host().c_str(), port());
builder.AddListeningPort(server_address,
Server::CreateServerCredentials(config));
gpr_free(server_address);

@ -57,6 +57,7 @@ static void RunSynchronousStreamingPingPong() {
ServerConfig server_config;
server_config.set_server_type(SYNC_SERVER);
server_config.set_host("localhost");
const auto result =
RunScenario(client_config, 1, server_config, 1, WARMUP, BENCHMARK, -2);

@ -57,6 +57,7 @@ static void RunSynchronousUnaryPingPong() {
ServerConfig server_config;
server_config.set_server_type(SYNC_SERVER);
server_config.set_host("localhost");
const auto result =
RunScenario(client_config, 1, server_config, 1, WARMUP, BENCHMARK, -2);

Loading…
Cancel
Save