aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/boringssl/err_data.c510
-rw-r--r--src/core/ext/client_config/parse_address.c137
-rw-r--r--src/core/ext/client_config/parse_address.h56
-rw-r--r--src/core/ext/resolver/sockaddr/sockaddr_resolver.c98
-rw-r--r--src/core/ext/transport/chttp2/transport/hpack_parser.c12
-rw-r--r--src/core/lib/support/log.c33
-rw-r--r--src/core/lib/surface/init.c2
-rw-r--r--src/csharp/Grpc.IntegrationTesting/ClientRunners.cs1
-rw-r--r--src/csharp/Grpc.IntegrationTesting/Control.cs1684
-rw-r--r--src/csharp/Grpc.IntegrationTesting/Messages.cs121
-rw-r--r--src/csharp/Grpc.IntegrationTesting/Test.cs8
-rw-r--r--src/csharp/Grpc.IntegrationTesting/TestGrpc.cs25
-rw-r--r--src/node/performance/worker.js2
-rw-r--r--src/node/performance/worker_service_impl.js3
-rw-r--r--src/php/tests/bootstrap.php2
-rw-r--r--src/php/tests/generated_code/GeneratedCodeWithCallbackTest.php3
-rw-r--r--src/php/tests/generated_code/math_client.php4
-rw-r--r--src/php/tests/unit_tests/CallCredentials3Test.php1
-rwxr-xr-xsrc/php/tests/unit_tests/CallTest.php3
-rw-r--r--src/php/tests/unit_tests/ChannelCredentialsTest.php2
-rw-r--r--src/php/tests/unit_tests/ChannelTest.php3
-rwxr-xr-xsrc/php/tests/unit_tests/EndToEndTest.php8
-rw-r--r--src/php/tests/unit_tests/ServerTest.php3
-rwxr-xr-xsrc/php/tests/unit_tests/TimevalTest.php15
-rw-r--r--src/proto/grpc/testing/control.proto56
-rw-r--r--src/python/grpcio/grpc/_cython/imports.generated.c4
-rw-r--r--src/python/grpcio/grpc/_cython/imports.generated.h6
-rw-r--r--src/python/grpcio/grpc_core_dependencies.py4
-rw-r--r--src/ruby/ext/grpc/rb_grpc_imports.generated.c4
-rw-r--r--src/ruby/ext/grpc/rb_grpc_imports.generated.h6
-rw-r--r--src/ruby/qps/server.rb3
-rw-r--r--src/ruby/qps/src/proto/grpc/testing/control.rb55
-rw-r--r--src/ruby/qps/src/proto/grpc/testing/messages.rb4
-rwxr-xr-xsrc/ruby/qps/worker.rb4
34 files changed, 1918 insertions, 964 deletions
diff --git a/src/boringssl/err_data.c b/src/boringssl/err_data.c
index 1a1d950419..d4cc08bd99 100644
--- a/src/boringssl/err_data.c
+++ b/src/boringssl/err_data.c
@@ -54,30 +54,30 @@ OPENSSL_COMPILE_ASSERT(ERR_LIB_USER == 32, library_values_changed_32);
OPENSSL_COMPILE_ASSERT(ERR_NUM_LIBS == 33, library_values_changed_num);
const uint32_t kOpenSSLReasonValues[] = {
- 0xc3207ba,
- 0xc3287d4,
- 0xc3307e3,
- 0xc3387f3,
- 0xc340802,
- 0xc34881b,
- 0xc350827,
- 0xc358844,
- 0xc360856,
- 0xc368864,
- 0xc370874,
- 0xc378881,
- 0xc380891,
- 0xc38889c,
- 0xc3908b2,
- 0xc3988c1,
- 0xc3a08d5,
- 0xc3a87c7,
+ 0xc3207ab,
+ 0xc3287c5,
+ 0xc3307d4,
+ 0xc3387e4,
+ 0xc3407f3,
+ 0xc34880c,
+ 0xc350818,
+ 0xc358835,
+ 0xc360847,
+ 0xc368855,
+ 0xc370865,
+ 0xc378872,
+ 0xc380882,
+ 0xc38888d,
+ 0xc3908a3,
+ 0xc3988b2,
+ 0xc3a08c6,
+ 0xc3a87b8,
0xc3b00b0,
- 0x10321478,
- 0x10329484,
- 0x1033149d,
- 0x103394b0,
- 0x10340de1,
+ 0x10321484,
+ 0x10329490,
+ 0x103314a9,
+ 0x103394bc,
+ 0x10340ded,
0x103494cf,
0x103514e4,
0x10359516,
@@ -97,7 +97,7 @@ const uint32_t kOpenSSLReasonValues[] = {
0x103c9658,
0x103d166f,
0x103d9682,
- 0x103e0b6c,
+ 0x103e0b5d,
0x103e96b3,
0x103f16c6,
0x103f96e0,
@@ -108,87 +108,91 @@ const uint32_t kOpenSSLReasonValues[] = {
0x10421747,
0x1042975b,
0x1043176d,
- 0x104385d0,
- 0x104408c1,
+ 0x104385c1,
+ 0x104408b2,
0x10449782,
0x10451799,
0x104597ae,
0x104617bc,
0x10469695,
0x104714f7,
- 0x104787c7,
+ 0x104787b8,
0x104800b0,
- 0x104894c3,
- 0x14320b4f,
- 0x14328b5d,
- 0x14330b6c,
- 0x14338b7e,
+ 0x10488b8c,
+ 0x14320b40,
+ 0x14328b4e,
+ 0x14330b5d,
+ 0x14338b6f,
0x18320083,
- 0x18328e47,
- 0x18340e75,
- 0x18348e89,
- 0x18358ec0,
- 0x18368eed,
- 0x18370f00,
- 0x18378f14,
- 0x18380f38,
- 0x18388f46,
- 0x18390f5c,
- 0x18398f70,
- 0x183a0f80,
- 0x183b0f90,
- 0x183b8fa5,
- 0x183c8fd0,
- 0x183d0fe4,
- 0x183d8ff4,
- 0x183e0b9b,
- 0x183e9001,
- 0x183f1013,
- 0x183f901e,
- 0x1840102e,
- 0x1840903f,
- 0x18411050,
- 0x18419062,
- 0x1842108b,
- 0x184290bd,
- 0x184310cc,
- 0x18451135,
- 0x1845914b,
- 0x18461166,
- 0x18468ed8,
- 0x184709d9,
+ 0x18328e53,
+ 0x18340e81,
+ 0x18348e95,
+ 0x18358ecc,
+ 0x18368ef9,
+ 0x18370f0c,
+ 0x18378f20,
+ 0x18380f44,
+ 0x18388f52,
+ 0x18390f68,
+ 0x18398f7c,
+ 0x183a0f8c,
+ 0x183b0f9c,
+ 0x183b8fb1,
+ 0x183c8fdc,
+ 0x183d0ff0,
+ 0x183d9000,
+ 0x183e0b98,
+ 0x183e900d,
+ 0x183f101f,
+ 0x183f902a,
+ 0x1840103a,
+ 0x1840904b,
+ 0x1841105c,
+ 0x1841906e,
+ 0x18421097,
+ 0x184290c9,
+ 0x184310d8,
+ 0x18451141,
+ 0x18459157,
+ 0x18461172,
+ 0x18468ee4,
+ 0x184709ca,
0x18478094,
- 0x18480fbc,
- 0x18489101,
- 0x18490e5d,
- 0x18498e9e,
- 0x184a119c,
- 0x184a9119,
- 0x184b10e0,
- 0x184b8e37,
- 0x184c10a4,
- 0x184c866b,
- 0x184d1181,
- 0x203211c3,
- 0x243211cf,
- 0x24328907,
- 0x243311e1,
- 0x243391ee,
- 0x243411fb,
- 0x2434920d,
- 0x2435121c,
- 0x24359239,
- 0x24361246,
- 0x24369254,
- 0x24371262,
- 0x24379270,
- 0x24381279,
- 0x24389286,
- 0x24391299,
- 0x28320b8f,
- 0x28328b9b,
- 0x28330b6c,
- 0x28338bae,
+ 0x18480fc8,
+ 0x1848910d,
+ 0x18490e69,
+ 0x18498eaa,
+ 0x184a11a8,
+ 0x184a9125,
+ 0x184b10ec,
+ 0x184b8e43,
+ 0x184c10b0,
+ 0x184c865c,
+ 0x184d118d,
+ 0x184d80b0,
+ 0x203211cf,
+ 0x243211db,
+ 0x243288f8,
+ 0x243311ed,
+ 0x243391fa,
+ 0x24341207,
+ 0x24349219,
+ 0x24351228,
+ 0x24359245,
+ 0x24361252,
+ 0x24369260,
+ 0x2437126e,
+ 0x2437927c,
+ 0x24381285,
+ 0x24389292,
+ 0x243912a5,
+ 0x28320b80,
+ 0x28328b98,
+ 0x28330b5d,
+ 0x28338bab,
+ 0x28340b8c,
+ 0x28348094,
+ 0x283500b0,
0x2c32281d,
0x2c32a82b,
0x2c33283d,
@@ -207,7 +211,7 @@ const uint32_t kOpenSSLReasonValues[] = {
0x2c39a917,
0x2c3a292b,
0x2c3aa93c,
- 0x2c3b1359,
+ 0x2c3b1365,
0x2c3ba94d,
0x2c3c2961,
0x2c3ca977,
@@ -219,12 +223,12 @@ const uint32_t kOpenSSLReasonValues[] = {
0x2c3faa09,
0x2c402a2c,
0x2c40aa4b,
- 0x2c4111c3,
+ 0x2c4111cf,
0x2c41aa5c,
0x2c422a6f,
- 0x2c429135,
+ 0x2c429141,
0x2c432a80,
- 0x2c4386a2,
+ 0x2c438693,
0x2c4429ad,
0x30320000,
0x30328015,
@@ -277,77 +281,79 @@ const uint32_t kOpenSSLReasonValues[] = {
0x304a03b4,
0x304a83c7,
0x304b03d2,
- 0x304b83e1,
- 0x304c03f2,
- 0x304c83fe,
- 0x304d0414,
- 0x304d8422,
- 0x304e0438,
- 0x304e844a,
- 0x304f045c,
- 0x304f846f,
- 0x30500482,
- 0x30508493,
- 0x305104a3,
- 0x305184bb,
- 0x305204d0,
- 0x305284e8,
- 0x305304fc,
- 0x30538514,
- 0x3054052d,
- 0x30548546,
- 0x30550563,
- 0x3055856e,
- 0x30560586,
- 0x30568596,
- 0x305705a7,
- 0x305785ba,
- 0x305805d0,
- 0x305885d9,
- 0x305905ee,
+ 0x304b83e3,
+ 0x304c03ef,
+ 0x304c8405,
+ 0x304d0413,
+ 0x304d8429,
+ 0x304e043b,
+ 0x304e844d,
+ 0x304f0460,
+ 0x304f8473,
+ 0x30500484,
+ 0x30508494,
+ 0x305104ac,
+ 0x305184c1,
+ 0x305204d9,
+ 0x305284ed,
+ 0x30530505,
+ 0x3053851e,
+ 0x30540537,
+ 0x30548554,
+ 0x3055055f,
+ 0x30558577,
+ 0x30560587,
+ 0x30568598,
+ 0x305705ab,
+ 0x305785c1,
+ 0x305805ca,
+ 0x305885df,
+ 0x305905f2,
0x30598601,
- 0x305a0610,
+ 0x305a0621,
0x305a8630,
- 0x305b063f,
- 0x305b864b,
- 0x305c066b,
- 0x305c8687,
- 0x305d0698,
- 0x305d86a2,
- 0x34320ac9,
- 0x34328add,
- 0x34330afa,
- 0x34338b0d,
- 0x34340b1c,
- 0x34348b39,
+ 0x305b063c,
+ 0x305b865c,
+ 0x305c0678,
+ 0x305c8689,
+ 0x305d0693,
+ 0x34320aba,
+ 0x34328ace,
+ 0x34330aeb,
+ 0x34338afe,
+ 0x34340b0d,
+ 0x34348b2a,
0x3c320083,
- 0x3c328bd8,
- 0x3c330bf1,
- 0x3c338c0c,
- 0x3c340c29,
- 0x3c348c44,
- 0x3c350c5f,
- 0x3c358c74,
- 0x3c360c8d,
- 0x3c368ca5,
- 0x3c370cb6,
- 0x3c378cc4,
- 0x3c380cd1,
- 0x3c388ce5,
- 0x3c390b9b,
- 0x3c398cf9,
- 0x3c3a0d0d,
- 0x3c3a8881,
- 0x3c3b0d1d,
- 0x3c3b8d38,
- 0x3c3c0d4a,
- 0x3c3c8d60,
- 0x3c3d0d6a,
- 0x3c3d8d7e,
- 0x3c3e0d8c,
- 0x3c3e8db1,
- 0x3c3f0bc4,
- 0x3c3f8d9a,
+ 0x3c328bd5,
+ 0x3c330bee,
+ 0x3c338c09,
+ 0x3c340c26,
+ 0x3c348c50,
+ 0x3c350c6b,
+ 0x3c358c80,
+ 0x3c360c99,
+ 0x3c368cb1,
+ 0x3c370cc2,
+ 0x3c378cd0,
+ 0x3c380cdd,
+ 0x3c388cf1,
+ 0x3c390b98,
+ 0x3c398d05,
+ 0x3c3a0d19,
+ 0x3c3a8872,
+ 0x3c3b0d29,
+ 0x3c3b8d44,
+ 0x3c3c0d56,
+ 0x3c3c8d6c,
+ 0x3c3d0d76,
+ 0x3c3d8d8a,
+ 0x3c3e0d98,
+ 0x3c3e8dbd,
+ 0x3c3f0bc1,
+ 0x3c3f8da6,
+ 0x3c400094,
+ 0x3c4080b0,
+ 0x3c410c41,
0x403217d3,
0x403297e9,
0x40331817,
@@ -362,7 +368,7 @@ const uint32_t kOpenSSLReasonValues[] = {
0x403798b8,
0x403818c3,
0x403898d5,
- 0x40390de1,
+ 0x40390ded,
0x403998e5,
0x403a18f8,
0x403a9919,
@@ -437,7 +443,7 @@ const uint32_t kOpenSSLReasonValues[] = {
0x405d1e9e,
0x405d9eb5,
0x405e1ed5,
- 0x405e8a17,
+ 0x405e8a08,
0x405f1ef6,
0x405f9f03,
0x40601f11,
@@ -474,18 +480,18 @@ const uint32_t kOpenSSLReasonValues[] = {
0x406fa60d,
0x40702620,
0x4070a63d,
- 0x40710782,
+ 0x40710773,
0x4071a64f,
0x40722662,
0x4072a67b,
0x40732693,
- 0x407390bd,
+ 0x407390c9,
0x407426a7,
0x4074a6c1,
0x407526d2,
0x4075a6e6,
0x407626f4,
- 0x40769286,
+ 0x40769292,
0x40772719,
0x4077a73b,
0x40782756,
@@ -528,48 +534,48 @@ const uint32_t kOpenSSLReasonValues[] = {
0x422c251d,
0x422ca4d8,
0x422d24b7,
- 0x443206ad,
- 0x443286bc,
- 0x443306c8,
- 0x443386d6,
- 0x443406e9,
- 0x443486fa,
- 0x44350701,
- 0x4435870b,
- 0x4436071e,
- 0x44368734,
- 0x44370746,
- 0x44378753,
- 0x44380762,
- 0x4438876a,
- 0x44390782,
- 0x44398790,
- 0x443a07a3,
- 0x4c3212b0,
- 0x4c3292c0,
- 0x4c3312d3,
- 0x4c3392f3,
+ 0x4432069e,
+ 0x443286ad,
+ 0x443306b9,
+ 0x443386c7,
+ 0x443406da,
+ 0x443486eb,
+ 0x443506f2,
+ 0x443586fc,
+ 0x4436070f,
+ 0x44368725,
+ 0x44370737,
+ 0x44378744,
+ 0x44380753,
+ 0x4438875b,
+ 0x44390773,
+ 0x44398781,
+ 0x443a0794,
+ 0x4c3212bc,
+ 0x4c3292cc,
+ 0x4c3312df,
+ 0x4c3392ff,
0x4c340094,
0x4c3480b0,
- 0x4c3512ff,
- 0x4c35930d,
- 0x4c361329,
- 0x4c36933c,
- 0x4c37134b,
- 0x4c379359,
- 0x4c38136e,
- 0x4c38937a,
- 0x4c39139a,
- 0x4c3993c4,
- 0x4c3a13dd,
- 0x4c3a93f6,
- 0x4c3b05d0,
- 0x4c3b940f,
- 0x4c3c1421,
- 0x4c3c9430,
- 0x4c3d10bd,
- 0x4c3d9449,
- 0x4c3e1456,
+ 0x4c35130b,
+ 0x4c359319,
+ 0x4c361335,
+ 0x4c369348,
+ 0x4c371357,
+ 0x4c379365,
+ 0x4c38137a,
+ 0x4c389386,
+ 0x4c3913a6,
+ 0x4c3993d0,
+ 0x4c3a13e9,
+ 0x4c3a9402,
+ 0x4c3b05c1,
+ 0x4c3b941b,
+ 0x4c3c142d,
+ 0x4c3c943c,
+ 0x4c3d10c9,
+ 0x4c3d9455,
+ 0x4c3e1462,
0x50322a92,
0x5032aaa1,
0x50332aac,
@@ -607,7 +613,7 @@ const uint32_t kOpenSSLReasonValues[] = {
0x50432d43,
0x5043ad53,
0x50442d62,
- 0x50448414,
+ 0x50448405,
0x50452d76,
0x5045ad94,
0x50462da7,
@@ -631,45 +637,45 @@ const uint32_t kOpenSSLReasonValues[] = {
0x504f2f62,
0x504faf79,
0x50502f88,
- 0x50508687,
+ 0x50508678,
0x50512f9b,
- 0x58320e1f,
- 0x68320de1,
- 0x68328b9b,
- 0x68330bae,
- 0x68338def,
- 0x68340dff,
+ 0x58320e2b,
+ 0x68320ded,
+ 0x68328b98,
+ 0x68330bab,
+ 0x68338dfb,
+ 0x68340e0b,
0x683480b0,
- 0x6c320dbd,
- 0x6c328b7e,
- 0x6c330dc8,
- 0x7432098d,
- 0x783208f2,
- 0x78328907,
- 0x78330913,
+ 0x6c320dc9,
+ 0x6c328b6f,
+ 0x6c330dd4,
+ 0x7432097e,
+ 0x783208e3,
+ 0x783288f8,
+ 0x78330904,
0x78338083,
- 0x78340922,
- 0x78348937,
- 0x78350956,
- 0x78358978,
- 0x7836098d,
- 0x783689a3,
- 0x783709b3,
- 0x783789c6,
- 0x783809d9,
- 0x783889eb,
- 0x783909f8,
- 0x78398a17,
- 0x783a0a2c,
- 0x783a8a3a,
- 0x783b0a44,
- 0x783b8a58,
- 0x783c0a6f,
- 0x783c8a84,
- 0x783d0a9b,
- 0x783d8ab0,
- 0x783e0a06,
- 0x7c3211b2,
+ 0x78340913,
+ 0x78348928,
+ 0x78350947,
+ 0x78358969,
+ 0x7836097e,
+ 0x78368994,
+ 0x783709a4,
+ 0x783789b7,
+ 0x783809ca,
+ 0x783889dc,
+ 0x783909e9,
+ 0x78398a08,
+ 0x783a0a1d,
+ 0x783a8a2b,
+ 0x783b0a35,
+ 0x783b8a49,
+ 0x783c0a60,
+ 0x783c8a75,
+ 0x783d0a8c,
+ 0x783d8aa1,
+ 0x783e09f7,
+ 0x7c3211be,
};
const size_t kOpenSSLReasonValuesLen = sizeof(kOpenSSLReasonValues) / sizeof(kOpenSSLReasonValues[0]);
@@ -725,7 +731,6 @@ const char kOpenSSLReasonStringData[] =
"INVALID_UNIVERSALSTRING_LENGTH\0"
"INVALID_UTF8STRING\0"
"LIST_ERROR\0"
- "MALLOC_FAILURE\0"
"MISSING_ASN1_EOS\0"
"MISSING_EOC\0"
"MISSING_SECOND_NUMBER\0"
@@ -833,6 +838,7 @@ const char kOpenSSLReasonStringData[] =
"MODULUS_TOO_LARGE\0"
"NO_PRIVATE_VALUE\0"
"BAD_Q_VALUE\0"
+ "BAD_VERSION\0"
"MISSING_PARAMETERS\0"
"NEED_NEW_SETUP_VALUES\0"
"BIGNUM_OUT_OF_RANGE\0"
@@ -840,6 +846,7 @@ const char kOpenSSLReasonStringData[] =
"D2I_ECPKPARAMETERS_FAILURE\0"
"EC_GROUP_NEW_BY_NAME_FAILURE\0"
"GROUP2PKPARAMETERS_FAILURE\0"
+ "GROUP_MISMATCH\0"
"I2D_ECPKPARAMETERS_FAILURE\0"
"INCOMPATIBLE_OBJECTS\0"
"INVALID_COMPRESSED_POINT\0"
@@ -948,7 +955,6 @@ const char kOpenSSLReasonStringData[] =
"BAD_FIXED_HEADER_DECRYPT\0"
"BAD_PAD_BYTE_COUNT\0"
"BAD_RSA_PARAMETERS\0"
- "BAD_VERSION\0"
"BLOCK_TYPE_IS_NOT_01\0"
"BN_NOT_INITIALIZED\0"
"CANNOT_RECOVER_MULTI_PRIME_KEY\0"
diff --git a/src/core/ext/client_config/parse_address.c b/src/core/ext/client_config/parse_address.c
new file mode 100644
index 0000000000..8b4abe24a6
--- /dev/null
+++ b/src/core/ext/client_config/parse_address.c
@@ -0,0 +1,137 @@
+/*
+ *
+ * Copyright 2016, Google Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include "src/core/ext/client_config/parse_address.h"
+
+#include <stdio.h>
+#include <string.h>
+#ifdef GPR_HAVE_UNIX_SOCKET
+#include <sys/un.h>
+#endif
+
+#include <grpc/support/alloc.h>
+#include <grpc/support/host_port.h>
+#include <grpc/support/log.h>
+#include <grpc/support/string_util.h>
+
+#ifdef GPR_HAVE_UNIX_SOCKET
+int parse_unix(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len) {
+ struct sockaddr_un *un = (struct sockaddr_un *)addr;
+
+ un->sun_family = AF_UNIX;
+ strcpy(un->sun_path, uri->path);
+ *len = strlen(un->sun_path) + sizeof(un->sun_family) + 1;
+
+ return 1;
+}
+#endif
+
+int parse_ipv4(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len) {
+ const char *host_port = uri->path;
+ char *host;
+ char *port;
+ int port_num;
+ int result = 0;
+ struct sockaddr_in *in = (struct sockaddr_in *)addr;
+
+ if (*host_port == '/') ++host_port;
+ if (!gpr_split_host_port(host_port, &host, &port)) {
+ return 0;
+ }
+
+ memset(in, 0, sizeof(*in));
+ *len = sizeof(*in);
+ in->sin_family = AF_INET;
+ if (inet_pton(AF_INET, host, &in->sin_addr) == 0) {
+ gpr_log(GPR_ERROR, "invalid ipv4 address: '%s'", host);
+ goto done;
+ }
+
+ if (port != NULL) {
+ if (sscanf(port, "%d", &port_num) != 1 || port_num < 0 ||
+ port_num > 65535) {
+ gpr_log(GPR_ERROR, "invalid ipv4 port: '%s'", port);
+ goto done;
+ }
+ in->sin_port = htons((uint16_t)port_num);
+ } else {
+ gpr_log(GPR_ERROR, "no port given for ipv4 scheme");
+ goto done;
+ }
+
+ result = 1;
+done:
+ gpr_free(host);
+ gpr_free(port);
+ return result;
+}
+
+int parse_ipv6(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len) {
+ const char *host_port = uri->path;
+ char *host;
+ char *port;
+ int port_num;
+ int result = 0;
+ struct sockaddr_in6 *in6 = (struct sockaddr_in6 *)addr;
+
+ if (*host_port == '/') ++host_port;
+ if (!gpr_split_host_port(host_port, &host, &port)) {
+ return 0;
+ }
+
+ memset(in6, 0, sizeof(*in6));
+ *len = sizeof(*in6);
+ in6->sin6_family = AF_INET6;
+ if (inet_pton(AF_INET6, host, &in6->sin6_addr) == 0) {
+ gpr_log(GPR_ERROR, "invalid ipv6 address: '%s'", host);
+ goto done;
+ }
+
+ if (port != NULL) {
+ if (sscanf(port, "%d", &port_num) != 1 || port_num < 0 ||
+ port_num > 65535) {
+ gpr_log(GPR_ERROR, "invalid ipv6 port: '%s'", port);
+ goto done;
+ }
+ in6->sin6_port = htons((uint16_t)port_num);
+ } else {
+ gpr_log(GPR_ERROR, "no port given for ipv6 scheme");
+ goto done;
+ }
+
+ result = 1;
+done:
+ gpr_free(host);
+ gpr_free(port);
+ return result;
+}
diff --git a/src/core/ext/client_config/parse_address.h b/src/core/ext/client_config/parse_address.h
new file mode 100644
index 0000000000..74c86f4d93
--- /dev/null
+++ b/src/core/ext/client_config/parse_address.h
@@ -0,0 +1,56 @@
+/*
+ *
+ * Copyright 2015, Google Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#ifndef GRPC_CORE_EXT_CLIENT_CONFIG_PARSE_ADDRESS_H
+#define GRPC_CORE_EXT_CLIENT_CONFIG_PARSE_ADDRESS_H
+
+#include <stddef.h>
+
+#include "src/core/ext/client_config/uri_parser.h"
+#include "src/core/lib/iomgr/sockaddr.h"
+
+#ifdef GPR_HAVE_UNIX_SOCKET
+/** Populate \a addr and \a len from \a uri, whose path is expected to contain a
+ * unix socket path. Returns true upon success. */
+int parse_unix(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len);
+#endif
+
+/** Populate /a addr and \a len from \a uri, whose path is expected to contain a
+ * host:port pair. Returns true upon success. */
+int parse_ipv4(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len);
+
+/** Populate /a addr and \a len from \a uri, whose path is expected to contain a
+ * host:port pair. Returns true upon success. */
+int parse_ipv6(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len);
+
+#endif /* GRPC_CORE_EXT_CLIENT_CONFIG_PARSE_ADDRESS_H */
diff --git a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c
index 1d54a86c39..a4fa9acf22 100644
--- a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c
+++ b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c
@@ -40,11 +40,8 @@
#include <grpc/support/port_platform.h>
#include <grpc/support/string_util.h>
-#ifdef GPR_HAVE_UNIX_SOCKET
-#include <sys/un.h>
-#endif
-
#include "src/core/ext/client_config/lb_policy_registry.h"
+#include "src/core/ext/client_config/parse_address.h"
#include "src/core/ext/client_config/resolver_registry.h"
#include "src/core/lib/iomgr/resolve_address.h"
#include "src/core/lib/iomgr/unix_sockets_posix.h"
@@ -167,105 +164,12 @@ static char *ipv6_get_default_authority(grpc_resolver_factory *factory,
}
#ifdef GPR_HAVE_UNIX_SOCKET
-static int parse_unix(grpc_uri *uri, struct sockaddr_storage *addr,
- size_t *len) {
- struct sockaddr_un *un = (struct sockaddr_un *)addr;
-
- un->sun_family = AF_UNIX;
- strcpy(un->sun_path, uri->path);
- *len = strlen(un->sun_path) + sizeof(un->sun_family) + 1;
-
- return 1;
-}
-
char *unix_get_default_authority(grpc_resolver_factory *factory,
grpc_uri *uri) {
return gpr_strdup("localhost");
}
#endif
-static int parse_ipv4(grpc_uri *uri, struct sockaddr_storage *addr,
- size_t *len) {
- const char *host_port = uri->path;
- char *host;
- char *port;
- int port_num;
- int result = 0;
- struct sockaddr_in *in = (struct sockaddr_in *)addr;
-
- if (*host_port == '/') ++host_port;
- if (!gpr_split_host_port(host_port, &host, &port)) {
- return 0;
- }
-
- memset(in, 0, sizeof(*in));
- *len = sizeof(*in);
- in->sin_family = AF_INET;
- if (inet_pton(AF_INET, host, &in->sin_addr) == 0) {
- gpr_log(GPR_ERROR, "invalid ipv4 address: '%s'", host);
- goto done;
- }
-
- if (port != NULL) {
- if (sscanf(port, "%d", &port_num) != 1 || port_num < 0 ||
- port_num > 65535) {
- gpr_log(GPR_ERROR, "invalid ipv4 port: '%s'", port);
- goto done;
- }
- in->sin_port = htons((uint16_t)port_num);
- } else {
- gpr_log(GPR_ERROR, "no port given for ipv4 scheme");
- goto done;
- }
-
- result = 1;
-done:
- gpr_free(host);
- gpr_free(port);
- return result;
-}
-
-static int parse_ipv6(grpc_uri *uri, struct sockaddr_storage *addr,
- size_t *len) {
- const char *host_port = uri->path;
- char *host;
- char *port;
- int port_num;
- int result = 0;
- struct sockaddr_in6 *in6 = (struct sockaddr_in6 *)addr;
-
- if (*host_port == '/') ++host_port;
- if (!gpr_split_host_port(host_port, &host, &port)) {
- return 0;
- }
-
- memset(in6, 0, sizeof(*in6));
- *len = sizeof(*in6);
- in6->sin6_family = AF_INET6;
- if (inet_pton(AF_INET6, host, &in6->sin6_addr) == 0) {
- gpr_log(GPR_ERROR, "invalid ipv6 address: '%s'", host);
- goto done;
- }
-
- if (port != NULL) {
- if (sscanf(port, "%d", &port_num) != 1 || port_num < 0 ||
- port_num > 65535) {
- gpr_log(GPR_ERROR, "invalid ipv6 port: '%s'", port);
- goto done;
- }
- in6->sin6_port = htons((uint16_t)port_num);
- } else {
- gpr_log(GPR_ERROR, "no port given for ipv6 scheme");
- goto done;
- }
-
- result = 1;
-done:
- gpr_free(host);
- gpr_free(port);
- return result;
-}
-
static void do_nothing(void *ignored) {}
static grpc_resolver *sockaddr_create(
diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.c b/src/core/ext/transport/chttp2/transport/hpack_parser.c
index a36d2fc382..93c3e6d8b4 100644
--- a/src/core/ext/transport/chttp2/transport/hpack_parser.c
+++ b/src/core/ext/transport/chttp2/transport/hpack_parser.c
@@ -638,6 +638,10 @@ static int on_hdr(grpc_chttp2_hpack_parser *p, grpc_mdelem *md,
return 0;
}
}
+ if (p->on_header == NULL) {
+ grpc_mdelem_unref(md);
+ return 0;
+ }
p->on_header(p->on_header_user_data, md);
return 1;
}
@@ -1382,12 +1386,8 @@ static int parse_value_string_with_literal_key(grpc_chttp2_hpack_parser *p,
/* PUBLIC INTERFACE */
-static void on_header_not_set(void *user_data, grpc_mdelem *md) {
- GPR_UNREACHABLE_CODE(return );
-}
-
void grpc_chttp2_hpack_parser_init(grpc_chttp2_hpack_parser *p) {
- p->on_header = on_header_not_set;
+ p->on_header = NULL;
p->on_header_user_data = NULL;
p->state = parse_begin;
p->key.str = NULL;
@@ -1455,7 +1455,7 @@ grpc_chttp2_parse_error grpc_chttp2_header_parser_parse(
stream_parsing->received_close = 1;
}
}
- parser->on_header = on_header_not_set;
+ parser->on_header = NULL;
parser->on_header_user_data = NULL;
parser->is_boundary = 0xde;
parser->is_eof = 0xde;
diff --git a/src/core/lib/support/log.c b/src/core/lib/support/log.c
index 04156a5b1f..882abf673c 100644
--- a/src/core/lib/support/log.c
+++ b/src/core/lib/support/log.c
@@ -31,14 +31,20 @@
*
*/
+#include <grpc/support/alloc.h>
+#include <grpc/support/atm.h>
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
+#include "src/core/lib/support/env.h"
+#include "src/core/lib/support/string.h"
+
#include <stdio.h>
#include <string.h>
extern void gpr_default_log(gpr_log_func_args *args);
static gpr_log_func g_log_func = gpr_default_log;
+static gpr_atm g_min_severity_to_print = GPR_LOG_VERBOSITY_UNSET;
const char *gpr_log_severity_string(gpr_log_severity severity) {
switch (severity) {
@@ -54,6 +60,9 @@ const char *gpr_log_severity_string(gpr_log_severity severity) {
void gpr_log_message(const char *file, int line, gpr_log_severity severity,
const char *message) {
+ if ((gpr_atm)severity < gpr_atm_no_barrier_load(&g_min_severity_to_print))
+ return;
+
gpr_log_func_args lfargs;
memset(&lfargs, 0, sizeof(lfargs));
lfargs.file = file;
@@ -63,4 +72,28 @@ void gpr_log_message(const char *file, int line, gpr_log_severity severity,
g_log_func(&lfargs);
}
+void gpr_set_log_verbosity(gpr_log_severity min_severity_to_print) {
+ gpr_atm_no_barrier_store(&g_min_severity_to_print,
+ (gpr_atm)min_severity_to_print);
+}
+
+void gpr_log_verbosity_init() {
+ char *verbosity = gpr_getenv("GRPC_VERBOSITY");
+ if (verbosity == NULL) return;
+
+ gpr_atm min_severity_to_print = GPR_LOG_VERBOSITY_UNSET;
+ if (strcmp(verbosity, "DEBUG") == 0) {
+ min_severity_to_print = (gpr_atm)GPR_LOG_SEVERITY_DEBUG;
+ } else if (strcmp(verbosity, "INFO") == 0) {
+ min_severity_to_print = (gpr_atm)GPR_LOG_SEVERITY_INFO;
+ } else if (strcmp(verbosity, "ERROR") == 0) {
+ min_severity_to_print = (gpr_atm)GPR_LOG_SEVERITY_ERROR;
+ }
+ gpr_free(verbosity);
+ if ((gpr_atm_no_barrier_load(&g_min_severity_to_print)) ==
+ GPR_LOG_VERBOSITY_UNSET) {
+ gpr_atm_no_barrier_store(&g_min_severity_to_print, min_severity_to_print);
+ }
+}
+
void gpr_set_log_function(gpr_log_func f) { g_log_func = f; }
diff --git a/src/core/lib/surface/init.c b/src/core/lib/surface/init.c
index ec75af6e06..d4eb2f8ddd 100644
--- a/src/core/lib/surface/init.c
+++ b/src/core/lib/surface/init.c
@@ -38,6 +38,7 @@
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
+#include <grpc/support/log.h>
#include <grpc/support/time.h>
#include "src/core/lib/channel/channel_stack.h"
#include "src/core/lib/channel/compress_filter.h"
@@ -69,6 +70,7 @@ static gpr_mu g_init_mu;
static int g_initializations;
static void do_basic_init(void) {
+ gpr_log_verbosity_init();
gpr_mu_init(&g_init_mu);
grpc_register_built_in_plugins();
g_initializations = 0;
diff --git a/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs b/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs
index f954ca5f34..b4572756f2 100644
--- a/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs
+++ b/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs
@@ -129,6 +129,7 @@ namespace Grpc.IntegrationTesting
public ClientRunnerImpl(List<Channel> channels, ClientType clientType, RpcType rpcType, int outstandingRpcsPerChannel, LoadParams loadParams, PayloadConfig payloadConfig, HistogramParams histogramParams)
{
GrpcPreconditions.CheckArgument(outstandingRpcsPerChannel > 0, "outstandingRpcsPerChannel");
+ GrpcPreconditions.CheckNotNull(histogramParams, "histogramParams");
this.channels = new List<Channel>(channels);
this.clientType = clientType;
this.rpcType = rpcType;
diff --git a/src/csharp/Grpc.IntegrationTesting/Control.cs b/src/csharp/Grpc.IntegrationTesting/Control.cs
index 291bc75397..003d2428fa 100644
--- a/src/csharp/Grpc.IntegrationTesting/Control.cs
+++ b/src/csharp/Grpc.IntegrationTesting/Control.cs
@@ -26,58 +26,67 @@ namespace Grpc.Testing {
"CiRzcmMvcHJvdG8vZ3JwYy90ZXN0aW5nL2NvbnRyb2wucHJvdG8SDGdycGMu",
"dGVzdGluZxolc3JjL3Byb3RvL2dycGMvdGVzdGluZy9wYXlsb2Fkcy5wcm90",
"bxoic3JjL3Byb3RvL2dycGMvdGVzdGluZy9zdGF0cy5wcm90byIlCg1Qb2lz",
- "c29uUGFyYW1zEhQKDG9mZmVyZWRfbG9hZBgBIAEoASJBCg1Vbmlmb3JtUGFy",
- "YW1zEhcKD2ludGVyYXJyaXZhbF9sbxgBIAEoARIXCg9pbnRlcmFycml2YWxf",
- "aGkYAiABKAEiKwoTRGV0ZXJtaW5pc3RpY1BhcmFtcxIUCgxvZmZlcmVkX2xv",
- "YWQYASABKAEiOAoMUGFyZXRvUGFyYW1zEhkKEWludGVyYXJyaXZhbF9iYXNl",
- "GAEgASgBEg0KBWFscGhhGAIgASgBIhIKEENsb3NlZExvb3BQYXJhbXMijgIK",
- "CkxvYWRQYXJhbXMSNQoLY2xvc2VkX2xvb3AYASABKAsyHi5ncnBjLnRlc3Rp",
- "bmcuQ2xvc2VkTG9vcFBhcmFtc0gAEi4KB3BvaXNzb24YAiABKAsyGy5ncnBj",
- "LnRlc3RpbmcuUG9pc3NvblBhcmFtc0gAEi4KB3VuaWZvcm0YAyABKAsyGy5n",
- "cnBjLnRlc3RpbmcuVW5pZm9ybVBhcmFtc0gAEjMKBmRldGVybRgEIAEoCzIh",
- "LmdycGMudGVzdGluZy5EZXRlcm1pbmlzdGljUGFyYW1zSAASLAoGcGFyZXRv",
- "GAUgASgLMhouZ3JwYy50ZXN0aW5nLlBhcmV0b1BhcmFtc0gAQgYKBGxvYWQi",
- "QwoOU2VjdXJpdHlQYXJhbXMSEwoLdXNlX3Rlc3RfY2EYASABKAgSHAoUc2Vy",
- "dmVyX2hvc3Rfb3ZlcnJpZGUYAiABKAki1gMKDENsaWVudENvbmZpZxIWCg5z",
- "ZXJ2ZXJfdGFyZ2V0cxgBIAMoCRItCgtjbGllbnRfdHlwZRgCIAEoDjIYLmdy",
- "cGMudGVzdGluZy5DbGllbnRUeXBlEjUKD3NlY3VyaXR5X3BhcmFtcxgDIAEo",
- "CzIcLmdycGMudGVzdGluZy5TZWN1cml0eVBhcmFtcxIkChxvdXRzdGFuZGlu",
- "Z19ycGNzX3Blcl9jaGFubmVsGAQgASgFEhcKD2NsaWVudF9jaGFubmVscxgF",
- "IAEoBRIcChRhc3luY19jbGllbnRfdGhyZWFkcxgHIAEoBRInCghycGNfdHlw",
- "ZRgIIAEoDjIVLmdycGMudGVzdGluZy5ScGNUeXBlEi0KC2xvYWRfcGFyYW1z",
- "GAogASgLMhguZ3JwYy50ZXN0aW5nLkxvYWRQYXJhbXMSMwoOcGF5bG9hZF9j",
- "b25maWcYCyABKAsyGy5ncnBjLnRlc3RpbmcuUGF5bG9hZENvbmZpZxI3ChBo",
- "aXN0b2dyYW1fcGFyYW1zGAwgASgLMh0uZ3JwYy50ZXN0aW5nLkhpc3RvZ3Jh",
- "bVBhcmFtcxIRCgljb3JlX2xpc3QYDSADKAUSEgoKY29yZV9saW1pdBgOIAEo",
- "BSI4CgxDbGllbnRTdGF0dXMSKAoFc3RhdHMYASABKAsyGS5ncnBjLnRlc3Rp",
- "bmcuQ2xpZW50U3RhdHMiFQoETWFyaxINCgVyZXNldBgBIAEoCCJoCgpDbGll",
- "bnRBcmdzEisKBXNldHVwGAEgASgLMhouZ3JwYy50ZXN0aW5nLkNsaWVudENv",
- "bmZpZ0gAEiIKBG1hcmsYAiABKAsyEi5ncnBjLnRlc3RpbmcuTWFya0gAQgkK",
- "B2FyZ3R5cGUi/AEKDFNlcnZlckNvbmZpZxItCgtzZXJ2ZXJfdHlwZRgBIAEo",
- "DjIYLmdycGMudGVzdGluZy5TZXJ2ZXJUeXBlEjUKD3NlY3VyaXR5X3BhcmFt",
- "cxgCIAEoCzIcLmdycGMudGVzdGluZy5TZWN1cml0eVBhcmFtcxIMCgRwb3J0",
- "GAQgASgFEhwKFGFzeW5jX3NlcnZlcl90aHJlYWRzGAcgASgFEhIKCmNvcmVf",
- "bGltaXQYCCABKAUSMwoOcGF5bG9hZF9jb25maWcYCSABKAsyGy5ncnBjLnRl",
- "c3RpbmcuUGF5bG9hZENvbmZpZxIRCgljb3JlX2xpc3QYCiADKAUiaAoKU2Vy",
- "dmVyQXJncxIrCgVzZXR1cBgBIAEoCzIaLmdycGMudGVzdGluZy5TZXJ2ZXJD",
- "b25maWdIABIiCgRtYXJrGAIgASgLMhIuZ3JwYy50ZXN0aW5nLk1hcmtIAEIJ",
- "Cgdhcmd0eXBlIlUKDFNlcnZlclN0YXR1cxIoCgVzdGF0cxgBIAEoCzIZLmdy",
- "cGMudGVzdGluZy5TZXJ2ZXJTdGF0cxIMCgRwb3J0GAIgASgFEg0KBWNvcmVz",
- "GAMgASgFIg0KC0NvcmVSZXF1ZXN0Ih0KDENvcmVSZXNwb25zZRINCgVjb3Jl",
- "cxgBIAEoBSIGCgRWb2lkKi8KCkNsaWVudFR5cGUSDwoLU1lOQ19DTElFTlQQ",
- "ABIQCgxBU1lOQ19DTElFTlQQASpJCgpTZXJ2ZXJUeXBlEg8KC1NZTkNfU0VS",
- "VkVSEAASEAoMQVNZTkNfU0VSVkVSEAESGAoUQVNZTkNfR0VORVJJQ19TRVJW",
- "RVIQAiojCgdScGNUeXBlEgkKBVVOQVJZEAASDQoJU1RSRUFNSU5HEAFiBnBy",
- "b3RvMw=="));
+ "c29uUGFyYW1zEhQKDG9mZmVyZWRfbG9hZBgBIAEoASISChBDbG9zZWRMb29w",
+ "UGFyYW1zInsKCkxvYWRQYXJhbXMSNQoLY2xvc2VkX2xvb3AYASABKAsyHi5n",
+ "cnBjLnRlc3RpbmcuQ2xvc2VkTG9vcFBhcmFtc0gAEi4KB3BvaXNzb24YAiAB",
+ "KAsyGy5ncnBjLnRlc3RpbmcuUG9pc3NvblBhcmFtc0gAQgYKBGxvYWQiQwoO",
+ "U2VjdXJpdHlQYXJhbXMSEwoLdXNlX3Rlc3RfY2EYASABKAgSHAoUc2VydmVy",
+ "X2hvc3Rfb3ZlcnJpZGUYAiABKAki1gMKDENsaWVudENvbmZpZxIWCg5zZXJ2",
+ "ZXJfdGFyZ2V0cxgBIAMoCRItCgtjbGllbnRfdHlwZRgCIAEoDjIYLmdycGMu",
+ "dGVzdGluZy5DbGllbnRUeXBlEjUKD3NlY3VyaXR5X3BhcmFtcxgDIAEoCzIc",
+ "LmdycGMudGVzdGluZy5TZWN1cml0eVBhcmFtcxIkChxvdXRzdGFuZGluZ19y",
+ "cGNzX3Blcl9jaGFubmVsGAQgASgFEhcKD2NsaWVudF9jaGFubmVscxgFIAEo",
+ "BRIcChRhc3luY19jbGllbnRfdGhyZWFkcxgHIAEoBRInCghycGNfdHlwZRgI",
+ "IAEoDjIVLmdycGMudGVzdGluZy5ScGNUeXBlEi0KC2xvYWRfcGFyYW1zGAog",
+ "ASgLMhguZ3JwYy50ZXN0aW5nLkxvYWRQYXJhbXMSMwoOcGF5bG9hZF9jb25m",
+ "aWcYCyABKAsyGy5ncnBjLnRlc3RpbmcuUGF5bG9hZENvbmZpZxI3ChBoaXN0",
+ "b2dyYW1fcGFyYW1zGAwgASgLMh0uZ3JwYy50ZXN0aW5nLkhpc3RvZ3JhbVBh",
+ "cmFtcxIRCgljb3JlX2xpc3QYDSADKAUSEgoKY29yZV9saW1pdBgOIAEoBSI4",
+ "CgxDbGllbnRTdGF0dXMSKAoFc3RhdHMYASABKAsyGS5ncnBjLnRlc3Rpbmcu",
+ "Q2xpZW50U3RhdHMiFQoETWFyaxINCgVyZXNldBgBIAEoCCJoCgpDbGllbnRB",
+ "cmdzEisKBXNldHVwGAEgASgLMhouZ3JwYy50ZXN0aW5nLkNsaWVudENvbmZp",
+ "Z0gAEiIKBG1hcmsYAiABKAsyEi5ncnBjLnRlc3RpbmcuTWFya0gAQgkKB2Fy",
+ "Z3R5cGUi/AEKDFNlcnZlckNvbmZpZxItCgtzZXJ2ZXJfdHlwZRgBIAEoDjIY",
+ "LmdycGMudGVzdGluZy5TZXJ2ZXJUeXBlEjUKD3NlY3VyaXR5X3BhcmFtcxgC",
+ "IAEoCzIcLmdycGMudGVzdGluZy5TZWN1cml0eVBhcmFtcxIMCgRwb3J0GAQg",
+ "ASgFEhwKFGFzeW5jX3NlcnZlcl90aHJlYWRzGAcgASgFEhIKCmNvcmVfbGlt",
+ "aXQYCCABKAUSMwoOcGF5bG9hZF9jb25maWcYCSABKAsyGy5ncnBjLnRlc3Rp",
+ "bmcuUGF5bG9hZENvbmZpZxIRCgljb3JlX2xpc3QYCiADKAUiaAoKU2VydmVy",
+ "QXJncxIrCgVzZXR1cBgBIAEoCzIaLmdycGMudGVzdGluZy5TZXJ2ZXJDb25m",
+ "aWdIABIiCgRtYXJrGAIgASgLMhIuZ3JwYy50ZXN0aW5nLk1hcmtIAEIJCgdh",
+ "cmd0eXBlIlUKDFNlcnZlclN0YXR1cxIoCgVzdGF0cxgBIAEoCzIZLmdycGMu",
+ "dGVzdGluZy5TZXJ2ZXJTdGF0cxIMCgRwb3J0GAIgASgFEg0KBWNvcmVzGAMg",
+ "ASgFIg0KC0NvcmVSZXF1ZXN0Ih0KDENvcmVSZXNwb25zZRINCgVjb3JlcxgB",
+ "IAEoBSIGCgRWb2lkIv0BCghTY2VuYXJpbxIMCgRuYW1lGAEgASgJEjEKDWNs",
+ "aWVudF9jb25maWcYAiABKAsyGi5ncnBjLnRlc3RpbmcuQ2xpZW50Q29uZmln",
+ "EhMKC251bV9jbGllbnRzGAMgASgFEjEKDXNlcnZlcl9jb25maWcYBCABKAsy",
+ "Gi5ncnBjLnRlc3RpbmcuU2VydmVyQ29uZmlnEhMKC251bV9zZXJ2ZXJzGAUg",
+ "ASgFEhYKDndhcm11cF9zZWNvbmRzGAYgASgFEhkKEWJlbmNobWFya19zZWNv",
+ "bmRzGAcgASgFEiAKGHNwYXduX2xvY2FsX3dvcmtlcl9jb3VudBgIIAEoBSI2",
+ "CglTY2VuYXJpb3MSKQoJc2NlbmFyaW9zGAEgAygLMhYuZ3JwYy50ZXN0aW5n",
+ "LlNjZW5hcmlvIpICChVTY2VuYXJpb1Jlc3VsdFN1bW1hcnkSCwoDcXBzGAEg",
+ "ASgBEhsKE3Fwc19wZXJfc2VydmVyX2NvcmUYAiABKAESGgoSc2VydmVyX3N5",
+ "c3RlbV90aW1lGAMgASgBEhgKEHNlcnZlcl91c2VyX3RpbWUYBCABKAESGgoS",
+ "Y2xpZW50X3N5c3RlbV90aW1lGAUgASgBEhgKEGNsaWVudF91c2VyX3RpbWUY",
+ "BiABKAESEgoKbGF0ZW5jeV81MBgHIAEoARISCgpsYXRlbmN5XzkwGAggASgB",
+ "EhIKCmxhdGVuY3lfOTUYCSABKAESEgoKbGF0ZW5jeV85ORgKIAEoARITCgts",
+ "YXRlbmN5Xzk5ORgLIAEoASKYAgoOU2NlbmFyaW9SZXN1bHQSKAoIc2NlbmFy",
+ "aW8YASABKAsyFi5ncnBjLnRlc3RpbmcuU2NlbmFyaW8SLgoJbGF0ZW5jaWVz",
+ "GAIgASgLMhsuZ3JwYy50ZXN0aW5nLkhpc3RvZ3JhbURhdGESLwoMY2xpZW50",
+ "X3N0YXRzGAMgAygLMhkuZ3JwYy50ZXN0aW5nLkNsaWVudFN0YXRzEi8KDHNl",
+ "cnZlcl9zdGF0cxgEIAMoCzIZLmdycGMudGVzdGluZy5TZXJ2ZXJTdGF0cxIU",
+ "CgxzZXJ2ZXJfY29yZXMYBSADKAUSNAoHc3VtbWFyeRgGIAEoCzIjLmdycGMu",
+ "dGVzdGluZy5TY2VuYXJpb1Jlc3VsdFN1bW1hcnkqLwoKQ2xpZW50VHlwZRIP",
+ "CgtTWU5DX0NMSUVOVBAAEhAKDEFTWU5DX0NMSUVOVBABKkkKClNlcnZlclR5",
+ "cGUSDwoLU1lOQ19TRVJWRVIQABIQCgxBU1lOQ19TRVJWRVIQARIYChRBU1lO",
+ "Q19HRU5FUklDX1NFUlZFUhACKiMKB1JwY1R5cGUSCQoFVU5BUlkQABINCglT",
+ "VFJFQU1JTkcQAWIGcHJvdG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Grpc.Testing.PayloadsReflection.Descriptor, global::Grpc.Testing.StatsReflection.Descriptor, },
new pbr::GeneratedCodeInfo(new[] {typeof(global::Grpc.Testing.ClientType), typeof(global::Grpc.Testing.ServerType), typeof(global::Grpc.Testing.RpcType), }, new pbr::GeneratedCodeInfo[] {
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.PoissonParams), global::Grpc.Testing.PoissonParams.Parser, new[]{ "OfferedLoad" }, null, null, null),
- new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.UniformParams), global::Grpc.Testing.UniformParams.Parser, new[]{ "InterarrivalLo", "InterarrivalHi" }, null, null, null),
- new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.DeterministicParams), global::Grpc.Testing.DeterministicParams.Parser, new[]{ "OfferedLoad" }, null, null, null),
- new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ParetoParams), global::Grpc.Testing.ParetoParams.Parser, new[]{ "InterarrivalBase", "Alpha" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ClosedLoopParams), global::Grpc.Testing.ClosedLoopParams.Parser, null, null, null, null),
- new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.LoadParams), global::Grpc.Testing.LoadParams.Parser, new[]{ "ClosedLoop", "Poisson", "Uniform", "Determ", "Pareto" }, new[]{ "Load" }, null, null),
+ new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.LoadParams), global::Grpc.Testing.LoadParams.Parser, new[]{ "ClosedLoop", "Poisson" }, new[]{ "Load" }, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.SecurityParams), global::Grpc.Testing.SecurityParams.Parser, new[]{ "UseTestCa", "ServerHostOverride" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ClientConfig), global::Grpc.Testing.ClientConfig.Parser, new[]{ "ServerTargets", "ClientType", "SecurityParams", "OutstandingRpcsPerChannel", "ClientChannels", "AsyncClientThreads", "RpcType", "LoadParams", "PayloadConfig", "HistogramParams", "CoreList", "CoreLimit" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ClientStatus), global::Grpc.Testing.ClientStatus.Parser, new[]{ "Stats" }, null, null, null),
@@ -88,7 +97,11 @@ namespace Grpc.Testing {
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ServerStatus), global::Grpc.Testing.ServerStatus.Parser, new[]{ "Stats", "Port", "Cores" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.CoreRequest), global::Grpc.Testing.CoreRequest.Parser, null, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.CoreResponse), global::Grpc.Testing.CoreResponse.Parser, new[]{ "Cores" }, null, null, null),
- new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.Void), global::Grpc.Testing.Void.Parser, null, null, null, null)
+ new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.Void), global::Grpc.Testing.Void.Parser, null, null, null, null),
+ new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.Scenario), global::Grpc.Testing.Scenario.Parser, new[]{ "Name", "ClientConfig", "NumClients", "ServerConfig", "NumServers", "WarmupSeconds", "BenchmarkSeconds", "SpawnLocalWorkerCount" }, null, null, null),
+ new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.Scenarios), global::Grpc.Testing.Scenarios.Parser, new[]{ "Scenarios_" }, null, null, null),
+ new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ScenarioResultSummary), global::Grpc.Testing.ScenarioResultSummary.Parser, new[]{ "Qps", "QpsPerServerCore", "ServerSystemTime", "ServerUserTime", "ClientSystemTime", "ClientUserTime", "Latency50", "Latency90", "Latency95", "Latency99", "Latency999" }, null, null, null),
+ new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ScenarioResult), global::Grpc.Testing.ScenarioResult.Parser, new[]{ "Scenario", "Latencies", "ClientStats", "ServerStats", "ServerCores", "Summary" }, null, null, null)
}));
}
#endregion
@@ -224,369 +237,6 @@ namespace Grpc.Testing {
}
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class UniformParams : pb::IMessage<UniformParams> {
- private static readonly pb::MessageParser<UniformParams> _parser = new pb::MessageParser<UniformParams>(() => new UniformParams());
- public static pb::MessageParser<UniformParams> Parser { get { return _parser; } }
-
- public static pbr::MessageDescriptor Descriptor {
- get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[1]; }
- }
-
- pbr::MessageDescriptor pb::IMessage.Descriptor {
- get { return Descriptor; }
- }
-
- public UniformParams() {
- OnConstruction();
- }
-
- partial void OnConstruction();
-
- public UniformParams(UniformParams other) : this() {
- interarrivalLo_ = other.interarrivalLo_;
- interarrivalHi_ = other.interarrivalHi_;
- }
-
- public UniformParams Clone() {
- return new UniformParams(this);
- }
-
- /// <summary>Field number for the "interarrival_lo" field.</summary>
- public const int InterarrivalLoFieldNumber = 1;
- private double interarrivalLo_;
- public double InterarrivalLo {
- get { return interarrivalLo_; }
- set {
- interarrivalLo_ = value;
- }
- }
-
- /// <summary>Field number for the "interarrival_hi" field.</summary>
- public const int InterarrivalHiFieldNumber = 2;
- private double interarrivalHi_;
- public double InterarrivalHi {
- get { return interarrivalHi_; }
- set {
- interarrivalHi_ = value;
- }
- }
-
- public override bool Equals(object other) {
- return Equals(other as UniformParams);
- }
-
- public bool Equals(UniformParams other) {
- if (ReferenceEquals(other, null)) {
- return false;
- }
- if (ReferenceEquals(other, this)) {
- return true;
- }
- if (InterarrivalLo != other.InterarrivalLo) return false;
- if (InterarrivalHi != other.InterarrivalHi) return false;
- return true;
- }
-
- public override int GetHashCode() {
- int hash = 1;
- if (InterarrivalLo != 0D) hash ^= InterarrivalLo.GetHashCode();
- if (InterarrivalHi != 0D) hash ^= InterarrivalHi.GetHashCode();
- return hash;
- }
-
- public override string ToString() {
- return pb::JsonFormatter.ToDiagnosticString(this);
- }
-
- public void WriteTo(pb::CodedOutputStream output) {
- if (InterarrivalLo != 0D) {
- output.WriteRawTag(9);
- output.WriteDouble(InterarrivalLo);
- }
- if (InterarrivalHi != 0D) {
- output.WriteRawTag(17);
- output.WriteDouble(InterarrivalHi);
- }
- }
-
- public int CalculateSize() {
- int size = 0;
- if (InterarrivalLo != 0D) {
- size += 1 + 8;
- }
- if (InterarrivalHi != 0D) {
- size += 1 + 8;
- }
- return size;
- }
-
- public void MergeFrom(UniformParams other) {
- if (other == null) {
- return;
- }
- if (other.InterarrivalLo != 0D) {
- InterarrivalLo = other.InterarrivalLo;
- }
- if (other.InterarrivalHi != 0D) {
- InterarrivalHi = other.InterarrivalHi;
- }
- }
-
- public void MergeFrom(pb::CodedInputStream input) {
- uint tag;
- while ((tag = input.ReadTag()) != 0) {
- switch(tag) {
- default:
- input.SkipLastField();
- break;
- case 9: {
- InterarrivalLo = input.ReadDouble();
- break;
- }
- case 17: {
- InterarrivalHi = input.ReadDouble();
- break;
- }
- }
- }
- }
-
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class DeterministicParams : pb::IMessage<DeterministicParams> {
- private static readonly pb::MessageParser<DeterministicParams> _parser = new pb::MessageParser<DeterministicParams>(() => new DeterministicParams());
- public static pb::MessageParser<DeterministicParams> Parser { get { return _parser; } }
-
- public static pbr::MessageDescriptor Descriptor {
- get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[2]; }
- }
-
- pbr::MessageDescriptor pb::IMessage.Descriptor {
- get { return Descriptor; }
- }
-
- public DeterministicParams() {
- OnConstruction();
- }
-
- partial void OnConstruction();
-
- public DeterministicParams(DeterministicParams other) : this() {
- offeredLoad_ = other.offeredLoad_;
- }
-
- public DeterministicParams Clone() {
- return new DeterministicParams(this);
- }
-
- /// <summary>Field number for the "offered_load" field.</summary>
- public const int OfferedLoadFieldNumber = 1;
- private double offeredLoad_;
- public double OfferedLoad {
- get { return offeredLoad_; }
- set {
- offeredLoad_ = value;
- }
- }
-
- public override bool Equals(object other) {
- return Equals(other as DeterministicParams);
- }
-
- public bool Equals(DeterministicParams other) {
- if (ReferenceEquals(other, null)) {
- return false;
- }
- if (ReferenceEquals(other, this)) {
- return true;
- }
- if (OfferedLoad != other.OfferedLoad) return false;
- return true;
- }
-
- public override int GetHashCode() {
- int hash = 1;
- if (OfferedLoad != 0D) hash ^= OfferedLoad.GetHashCode();
- return hash;
- }
-
- public override string ToString() {
- return pb::JsonFormatter.ToDiagnosticString(this);
- }
-
- public void WriteTo(pb::CodedOutputStream output) {
- if (OfferedLoad != 0D) {
- output.WriteRawTag(9);
- output.WriteDouble(OfferedLoad);
- }
- }
-
- public int CalculateSize() {
- int size = 0;
- if (OfferedLoad != 0D) {
- size += 1 + 8;
- }
- return size;
- }
-
- public void MergeFrom(DeterministicParams other) {
- if (other == null) {
- return;
- }
- if (other.OfferedLoad != 0D) {
- OfferedLoad = other.OfferedLoad;
- }
- }
-
- public void MergeFrom(pb::CodedInputStream input) {
- uint tag;
- while ((tag = input.ReadTag()) != 0) {
- switch(tag) {
- default:
- input.SkipLastField();
- break;
- case 9: {
- OfferedLoad = input.ReadDouble();
- break;
- }
- }
- }
- }
-
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- public sealed partial class ParetoParams : pb::IMessage<ParetoParams> {
- private static readonly pb::MessageParser<ParetoParams> _parser = new pb::MessageParser<ParetoParams>(() => new ParetoParams());
- public static pb::MessageParser<ParetoParams> Parser { get { return _parser; } }
-
- public static pbr::MessageDescriptor Descriptor {
- get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[3]; }
- }
-
- pbr::MessageDescriptor pb::IMessage.Descriptor {
- get { return Descriptor; }
- }
-
- public ParetoParams() {
- OnConstruction();
- }
-
- partial void OnConstruction();
-
- public ParetoParams(ParetoParams other) : this() {
- interarrivalBase_ = other.interarrivalBase_;
- alpha_ = other.alpha_;
- }
-
- public ParetoParams Clone() {
- return new ParetoParams(this);
- }
-
- /// <summary>Field number for the "interarrival_base" field.</summary>
- public const int InterarrivalBaseFieldNumber = 1;
- private double interarrivalBase_;
- public double InterarrivalBase {
- get { return interarrivalBase_; }
- set {
- interarrivalBase_ = value;
- }
- }
-
- /// <summary>Field number for the "alpha" field.</summary>
- public const int AlphaFieldNumber = 2;
- private double alpha_;
- public double Alpha {
- get { return alpha_; }
- set {
- alpha_ = value;
- }
- }
-
- public override bool Equals(object other) {
- return Equals(other as ParetoParams);
- }
-
- public bool Equals(ParetoParams other) {
- if (ReferenceEquals(other, null)) {
- return false;
- }
- if (ReferenceEquals(other, this)) {
- return true;
- }
- if (InterarrivalBase != other.InterarrivalBase) return false;
- if (Alpha != other.Alpha) return false;
- return true;
- }
-
- public override int GetHashCode() {
- int hash = 1;
- if (InterarrivalBase != 0D) hash ^= InterarrivalBase.GetHashCode();
- if (Alpha != 0D) hash ^= Alpha.GetHashCode();
- return hash;
- }
-
- public override string ToString() {
- return pb::JsonFormatter.ToDiagnosticString(this);
- }
-
- public void WriteTo(pb::CodedOutputStream output) {
- if (InterarrivalBase != 0D) {
- output.WriteRawTag(9);
- output.WriteDouble(InterarrivalBase);
- }
- if (Alpha != 0D) {
- output.WriteRawTag(17);
- output.WriteDouble(Alpha);
- }
- }
-
- public int CalculateSize() {
- int size = 0;
- if (InterarrivalBase != 0D) {
- size += 1 + 8;
- }
- if (Alpha != 0D) {
- size += 1 + 8;
- }
- return size;
- }
-
- public void MergeFrom(ParetoParams other) {
- if (other == null) {
- return;
- }
- if (other.InterarrivalBase != 0D) {
- InterarrivalBase = other.InterarrivalBase;
- }
- if (other.Alpha != 0D) {
- Alpha = other.Alpha;
- }
- }
-
- public void MergeFrom(pb::CodedInputStream input) {
- uint tag;
- while ((tag = input.ReadTag()) != 0) {
- switch(tag) {
- default:
- input.SkipLastField();
- break;
- case 9: {
- InterarrivalBase = input.ReadDouble();
- break;
- }
- case 17: {
- Alpha = input.ReadDouble();
- break;
- }
- }
- }
- }
-
- }
-
/// <summary>
/// Once an RPC finishes, immediately start a new one.
/// No configuration parameters needed.
@@ -597,7 +247,7 @@ namespace Grpc.Testing {
public static pb::MessageParser<ClosedLoopParams> Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
- get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[4]; }
+ get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[1]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
@@ -673,7 +323,7 @@ namespace Grpc.Testing {
public static pb::MessageParser<LoadParams> Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
- get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[5]; }
+ get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[2]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
@@ -694,15 +344,6 @@ namespace Grpc.Testing {
case LoadOneofCase.Poisson:
Poisson = other.Poisson.Clone();
break;
- case LoadOneofCase.Uniform:
- Uniform = other.Uniform.Clone();
- break;
- case LoadOneofCase.Determ:
- Determ = other.Determ.Clone();
- break;
- case LoadOneofCase.Pareto:
- Pareto = other.Pareto.Clone();
- break;
}
}
@@ -731,45 +372,12 @@ namespace Grpc.Testing {
}
}
- /// <summary>Field number for the "uniform" field.</summary>
- public const int UniformFieldNumber = 3;
- public global::Grpc.Testing.UniformParams Uniform {
- get { return loadCase_ == LoadOneofCase.Uniform ? (global::Grpc.Testing.UniformParams) load_ : null; }
- set {
- load_ = value;
- loadCase_ = value == null ? LoadOneofCase.None : LoadOneofCase.Uniform;
- }
- }
-
- /// <summary>Field number for the "determ" field.</summary>
- public const int DetermFieldNumber = 4;
- public global::Grpc.Testing.DeterministicParams Determ {
- get { return loadCase_ == LoadOneofCase.Determ ? (global::Grpc.Testing.DeterministicParams) load_ : null; }
- set {
- load_ = value;
- loadCase_ = value == null ? LoadOneofCase.None : LoadOneofCase.Determ;
- }
- }
-
- /// <summary>Field number for the "pareto" field.</summary>
- public const int ParetoFieldNumber = 5;
- public global::Grpc.Testing.ParetoParams Pareto {
- get { return loadCase_ == LoadOneofCase.Pareto ? (global::Grpc.Testing.ParetoParams) load_ : null; }
- set {
- load_ = value;
- loadCase_ = value == null ? LoadOneofCase.None : LoadOneofCase.Pareto;
- }
- }
-
private object load_;
/// <summary>Enum of possible cases for the "load" oneof.</summary>
public enum LoadOneofCase {
None = 0,
ClosedLoop = 1,
Poisson = 2,
- Uniform = 3,
- Determ = 4,
- Pareto = 5,
}
private LoadOneofCase loadCase_ = LoadOneofCase.None;
public LoadOneofCase LoadCase {
@@ -794,9 +402,6 @@ namespace Grpc.Testing {
}
if (!object.Equals(ClosedLoop, other.ClosedLoop)) return false;
if (!object.Equals(Poisson, other.Poisson)) return false;
- if (!object.Equals(Uniform, other.Uniform)) return false;
- if (!object.Equals(Determ, other.Determ)) return false;
- if (!object.Equals(Pareto, other.Pareto)) return false;
if (LoadCase != other.LoadCase) return false;
return true;
}
@@ -805,9 +410,6 @@ namespace Grpc.Testing {
int hash = 1;
if (loadCase_ == LoadOneofCase.ClosedLoop) hash ^= ClosedLoop.GetHashCode();
if (loadCase_ == LoadOneofCase.Poisson) hash ^= Poisson.GetHashCode();
- if (loadCase_ == LoadOneofCase.Uniform) hash ^= Uniform.GetHashCode();
- if (loadCase_ == LoadOneofCase.Determ) hash ^= Determ.GetHashCode();
- if (loadCase_ == LoadOneofCase.Pareto) hash ^= Pareto.GetHashCode();
hash ^= (int) loadCase_;
return hash;
}
@@ -825,18 +427,6 @@ namespace Grpc.Testing {
output.WriteRawTag(18);
output.WriteMessage(Poisson);
}
- if (loadCase_ == LoadOneofCase.Uniform) {
- output.WriteRawTag(26);
- output.WriteMessage(Uniform);
- }
- if (loadCase_ == LoadOneofCase.Determ) {
- output.WriteRawTag(34);
- output.WriteMessage(Determ);
- }
- if (loadCase_ == LoadOneofCase.Pareto) {
- output.WriteRawTag(42);
- output.WriteMessage(Pareto);
- }
}
public int CalculateSize() {
@@ -847,15 +437,6 @@ namespace Grpc.Testing {
if (loadCase_ == LoadOneofCase.Poisson) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Poisson);
}
- if (loadCase_ == LoadOneofCase.Uniform) {
- size += 1 + pb::CodedOutputStream.ComputeMessageSize(Uniform);
- }
- if (loadCase_ == LoadOneofCase.Determ) {
- size += 1 + pb::CodedOutputStream.ComputeMessageSize(Determ);
- }
- if (loadCase_ == LoadOneofCase.Pareto) {
- size += 1 + pb::CodedOutputStream.ComputeMessageSize(Pareto);
- }
return size;
}
@@ -870,15 +451,6 @@ namespace Grpc.Testing {
case LoadOneofCase.Poisson:
Poisson = other.Poisson;
break;
- case LoadOneofCase.Uniform:
- Uniform = other.Uniform;
- break;
- case LoadOneofCase.Determ:
- Determ = other.Determ;
- break;
- case LoadOneofCase.Pareto:
- Pareto = other.Pareto;
- break;
}
}
@@ -908,33 +480,6 @@ namespace Grpc.Testing {
Poisson = subBuilder;
break;
}
- case 26: {
- global::Grpc.Testing.UniformParams subBuilder = new global::Grpc.Testing.UniformParams();
- if (loadCase_ == LoadOneofCase.Uniform) {
- subBuilder.MergeFrom(Uniform);
- }
- input.ReadMessage(subBuilder);
- Uniform = subBuilder;
- break;
- }
- case 34: {
- global::Grpc.Testing.DeterministicParams subBuilder = new global::Grpc.Testing.DeterministicParams();
- if (loadCase_ == LoadOneofCase.Determ) {
- subBuilder.MergeFrom(Determ);
- }
- input.ReadMessage(subBuilder);
- Determ = subBuilder;
- break;
- }
- case 42: {
- global::Grpc.Testing.ParetoParams subBuilder = new global::Grpc.Testing.ParetoParams();
- if (loadCase_ == LoadOneofCase.Pareto) {
- subBuilder.MergeFrom(Pareto);
- }
- input.ReadMessage(subBuilder);
- Pareto = subBuilder;
- break;
- }
}
}
}
@@ -950,7 +495,7 @@ namespace Grpc.Testing {
public static pb::MessageParser<SecurityParams> Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
- get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[6]; }
+ get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[3]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
@@ -1080,7 +625,7 @@ namespace Grpc.Testing {
public static pb::MessageParser<ClientConfig> Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
- get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[7]; }
+ get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[4]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
@@ -1509,7 +1054,7 @@ namespace Grpc.Testing {
public static pb::MessageParser<ClientStatus> Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
- get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[8]; }
+ get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[5]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
@@ -1621,7 +1166,7 @@ namespace Grpc.Testing {
public static pb::MessageParser<Mark> Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
- get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[9]; }
+ get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[6]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
@@ -1727,7 +1272,7 @@ namespace Grpc.Testing {
public static pb::MessageParser<ClientArgs> Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
- get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[10]; }
+ get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[7]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
@@ -1896,7 +1441,7 @@ namespace Grpc.Testing {
public static pb::MessageParser<ServerConfig> Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
- get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[11]; }
+ get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[8]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
@@ -2181,7 +1726,7 @@ namespace Grpc.Testing {
public static pb::MessageParser<ServerArgs> Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
- get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[12]; }
+ get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[9]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
@@ -2350,7 +1895,7 @@ namespace Grpc.Testing {
public static pb::MessageParser<ServerStatus> Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
- get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[13]; }
+ get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[10]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
@@ -2519,7 +2064,7 @@ namespace Grpc.Testing {
public static pb::MessageParser<CoreRequest> Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
- get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[14]; }
+ get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[11]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
@@ -2595,7 +2140,7 @@ namespace Grpc.Testing {
public static pb::MessageParser<CoreResponse> Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
- get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[15]; }
+ get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[12]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
@@ -2701,7 +2246,7 @@ namespace Grpc.Testing {
public static pb::MessageParser<Void> Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
- get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[16]; }
+ get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[13]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
@@ -2771,6 +2316,1087 @@ namespace Grpc.Testing {
}
+ /// <summary>
+ /// A single performance scenario: input to qps_json_driver
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Scenario : pb::IMessage<Scenario> {
+ private static readonly pb::MessageParser<Scenario> _parser = new pb::MessageParser<Scenario>(() => new Scenario());
+ public static pb::MessageParser<Scenario> Parser { get { return _parser; } }
+
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[14]; }
+ }
+
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ public Scenario() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ public Scenario(Scenario other) : this() {
+ name_ = other.name_;
+ ClientConfig = other.clientConfig_ != null ? other.ClientConfig.Clone() : null;
+ numClients_ = other.numClients_;
+ ServerConfig = other.serverConfig_ != null ? other.ServerConfig.Clone() : null;
+ numServers_ = other.numServers_;
+ warmupSeconds_ = other.warmupSeconds_;
+ benchmarkSeconds_ = other.benchmarkSeconds_;
+ spawnLocalWorkerCount_ = other.spawnLocalWorkerCount_;
+ }
+
+ public Scenario Clone() {
+ return new Scenario(this);
+ }
+
+ /// <summary>Field number for the "name" field.</summary>
+ public const int NameFieldNumber = 1;
+ private string name_ = "";
+ /// <summary>
+ /// Human readable name for this scenario
+ /// </summary>
+ public string Name {
+ get { return name_; }
+ set {
+ name_ = pb::Preconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// <summary>Field number for the "client_config" field.</summary>
+ public const int ClientConfigFieldNumber = 2;
+ private global::Grpc.Testing.ClientConfig clientConfig_;
+ /// <summary>
+ /// Client configuration
+ /// </summary>
+ public global::Grpc.Testing.ClientConfig ClientConfig {
+ get { return clientConfig_; }
+ set {
+ clientConfig_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "num_clients" field.</summary>
+ public const int NumClientsFieldNumber = 3;
+ private int numClients_;
+ /// <summary>
+ /// Number of clients to start for the test
+ /// </summary>
+ public int NumClients {
+ get { return numClients_; }
+ set {
+ numClients_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "server_config" field.</summary>
+ public const int ServerConfigFieldNumber = 4;
+ private global::Grpc.Testing.ServerConfig serverConfig_;
+ /// <summary>
+ /// Server configuration
+ /// </summary>
+ public global::Grpc.Testing.ServerConfig ServerConfig {
+ get { return serverConfig_; }
+ set {
+ serverConfig_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "num_servers" field.</summary>
+ public const int NumServersFieldNumber = 5;
+ private int numServers_;
+ /// <summary>
+ /// Number of servers to start for the test
+ /// </summary>
+ public int NumServers {
+ get { return numServers_; }
+ set {
+ numServers_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "warmup_seconds" field.</summary>
+ public const int WarmupSecondsFieldNumber = 6;
+ private int warmupSeconds_;
+ /// <summary>
+ /// Warmup period, in seconds
+ /// </summary>
+ public int WarmupSeconds {
+ get { return warmupSeconds_; }
+ set {
+ warmupSeconds_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "benchmark_seconds" field.</summary>
+ public const int BenchmarkSecondsFieldNumber = 7;
+ private int benchmarkSeconds_;
+ /// <summary>
+ /// Benchmark time, in seconds
+ /// </summary>
+ public int BenchmarkSeconds {
+ get { return benchmarkSeconds_; }
+ set {
+ benchmarkSeconds_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "spawn_local_worker_count" field.</summary>
+ public const int SpawnLocalWorkerCountFieldNumber = 8;
+ private int spawnLocalWorkerCount_;
+ /// <summary>
+ /// Number of workers to spawn locally (usually zero)
+ /// </summary>
+ public int SpawnLocalWorkerCount {
+ get { return spawnLocalWorkerCount_; }
+ set {
+ spawnLocalWorkerCount_ = value;
+ }
+ }
+
+ public override bool Equals(object other) {
+ return Equals(other as Scenario);
+ }
+
+ public bool Equals(Scenario other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Name != other.Name) return false;
+ if (!object.Equals(ClientConfig, other.ClientConfig)) return false;
+ if (NumClients != other.NumClients) return false;
+ if (!object.Equals(ServerConfig, other.ServerConfig)) return false;
+ if (NumServers != other.NumServers) return false;
+ if (WarmupSeconds != other.WarmupSeconds) return false;
+ if (BenchmarkSeconds != other.BenchmarkSeconds) return false;
+ if (SpawnLocalWorkerCount != other.SpawnLocalWorkerCount) return false;
+ return true;
+ }
+
+ public override int GetHashCode() {
+ int hash = 1;
+ if (Name.Length != 0) hash ^= Name.GetHashCode();
+ if (clientConfig_ != null) hash ^= ClientConfig.GetHashCode();
+ if (NumClients != 0) hash ^= NumClients.GetHashCode();
+ if (serverConfig_ != null) hash ^= ServerConfig.GetHashCode();
+ if (NumServers != 0) hash ^= NumServers.GetHashCode();
+ if (WarmupSeconds != 0) hash ^= WarmupSeconds.GetHashCode();
+ if (BenchmarkSeconds != 0) hash ^= BenchmarkSeconds.GetHashCode();
+ if (SpawnLocalWorkerCount != 0) hash ^= SpawnLocalWorkerCount.GetHashCode();
+ return hash;
+ }
+
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (Name.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteString(Name);
+ }
+ if (clientConfig_ != null) {
+ output.WriteRawTag(18);
+ output.WriteMessage(ClientConfig);
+ }
+ if (NumClients != 0) {
+ output.WriteRawTag(24);
+ output.WriteInt32(NumClients);
+ }
+ if (serverConfig_ != null) {
+ output.WriteRawTag(34);
+ output.WriteMessage(ServerConfig);
+ }
+ if (NumServers != 0) {
+ output.WriteRawTag(40);
+ output.WriteInt32(NumServers);
+ }
+ if (WarmupSeconds != 0) {
+ output.WriteRawTag(48);
+ output.WriteInt32(WarmupSeconds);
+ }
+ if (BenchmarkSeconds != 0) {
+ output.WriteRawTag(56);
+ output.WriteInt32(BenchmarkSeconds);
+ }
+ if (SpawnLocalWorkerCount != 0) {
+ output.WriteRawTag(64);
+ output.WriteInt32(SpawnLocalWorkerCount);
+ }
+ }
+
+ public int CalculateSize() {
+ int size = 0;
+ if (Name.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
+ }
+ if (clientConfig_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(ClientConfig);
+ }
+ if (NumClients != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumClients);
+ }
+ if (serverConfig_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(ServerConfig);
+ }
+ if (NumServers != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumServers);
+ }
+ if (WarmupSeconds != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(WarmupSeconds);
+ }
+ if (BenchmarkSeconds != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(BenchmarkSeconds);
+ }
+ if (SpawnLocalWorkerCount != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(SpawnLocalWorkerCount);
+ }
+ return size;
+ }
+
+ public void MergeFrom(Scenario other) {
+ if (other == null) {
+ return;
+ }
+ if (other.Name.Length != 0) {
+ Name = other.Name;
+ }
+ if (other.clientConfig_ != null) {
+ if (clientConfig_ == null) {
+ clientConfig_ = new global::Grpc.Testing.ClientConfig();
+ }
+ ClientConfig.MergeFrom(other.ClientConfig);
+ }
+ if (other.NumClients != 0) {
+ NumClients = other.NumClients;
+ }
+ if (other.serverConfig_ != null) {
+ if (serverConfig_ == null) {
+ serverConfig_ = new global::Grpc.Testing.ServerConfig();
+ }
+ ServerConfig.MergeFrom(other.ServerConfig);
+ }
+ if (other.NumServers != 0) {
+ NumServers = other.NumServers;
+ }
+ if (other.WarmupSeconds != 0) {
+ WarmupSeconds = other.WarmupSeconds;
+ }
+ if (other.BenchmarkSeconds != 0) {
+ BenchmarkSeconds = other.BenchmarkSeconds;
+ }
+ if (other.SpawnLocalWorkerCount != 0) {
+ SpawnLocalWorkerCount = other.SpawnLocalWorkerCount;
+ }
+ }
+
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ input.SkipLastField();
+ break;
+ case 10: {
+ Name = input.ReadString();
+ break;
+ }
+ case 18: {
+ if (clientConfig_ == null) {
+ clientConfig_ = new global::Grpc.Testing.ClientConfig();
+ }
+ input.ReadMessage(clientConfig_);
+ break;
+ }
+ case 24: {
+ NumClients = input.ReadInt32();
+ break;
+ }
+ case 34: {
+ if (serverConfig_ == null) {
+ serverConfig_ = new global::Grpc.Testing.ServerConfig();
+ }
+ input.ReadMessage(serverConfig_);
+ break;
+ }
+ case 40: {
+ NumServers = input.ReadInt32();
+ break;
+ }
+ case 48: {
+ WarmupSeconds = input.ReadInt32();
+ break;
+ }
+ case 56: {
+ BenchmarkSeconds = input.ReadInt32();
+ break;
+ }
+ case 64: {
+ SpawnLocalWorkerCount = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ /// <summary>
+ /// A set of scenarios to be run with qps_json_driver
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class Scenarios : pb::IMessage<Scenarios> {
+ private static readonly pb::MessageParser<Scenarios> _parser = new pb::MessageParser<Scenarios>(() => new Scenarios());
+ public static pb::MessageParser<Scenarios> Parser { get { return _parser; } }
+
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[15]; }
+ }
+
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ public Scenarios() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ public Scenarios(Scenarios other) : this() {
+ scenarios_ = other.scenarios_.Clone();
+ }
+
+ public Scenarios Clone() {
+ return new Scenarios(this);
+ }
+
+ /// <summary>Field number for the "scenarios" field.</summary>
+ public const int Scenarios_FieldNumber = 1;
+ private static readonly pb::FieldCodec<global::Grpc.Testing.Scenario> _repeated_scenarios_codec
+ = pb::FieldCodec.ForMessage(10, global::Grpc.Testing.Scenario.Parser);
+ private readonly pbc::RepeatedField<global::Grpc.Testing.Scenario> scenarios_ = new pbc::RepeatedField<global::Grpc.Testing.Scenario>();
+ public pbc::RepeatedField<global::Grpc.Testing.Scenario> Scenarios_ {
+ get { return scenarios_; }
+ }
+
+ public override bool Equals(object other) {
+ return Equals(other as Scenarios);
+ }
+
+ public bool Equals(Scenarios other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if(!scenarios_.Equals(other.scenarios_)) return false;
+ return true;
+ }
+
+ public override int GetHashCode() {
+ int hash = 1;
+ hash ^= scenarios_.GetHashCode();
+ return hash;
+ }
+
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ public void WriteTo(pb::CodedOutputStream output) {
+ scenarios_.WriteTo(output, _repeated_scenarios_codec);
+ }
+
+ public int CalculateSize() {
+ int size = 0;
+ size += scenarios_.CalculateSize(_repeated_scenarios_codec);
+ return size;
+ }
+
+ public void MergeFrom(Scenarios other) {
+ if (other == null) {
+ return;
+ }
+ scenarios_.Add(other.scenarios_);
+ }
+
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ input.SkipLastField();
+ break;
+ case 10: {
+ scenarios_.AddEntriesFrom(input, _repeated_scenarios_codec);
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ /// <summary>
+ /// Basic summary that can be computed from ClientStats and ServerStats
+ /// once the scenario has finished.
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class ScenarioResultSummary : pb::IMessage<ScenarioResultSummary> {
+ private static readonly pb::MessageParser<ScenarioResultSummary> _parser = new pb::MessageParser<ScenarioResultSummary>(() => new ScenarioResultSummary());
+ public static pb::MessageParser<ScenarioResultSummary> Parser { get { return _parser; } }
+
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[16]; }
+ }
+
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ public ScenarioResultSummary() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ public ScenarioResultSummary(ScenarioResultSummary other) : this() {
+ qps_ = other.qps_;
+ qpsPerServerCore_ = other.qpsPerServerCore_;
+ serverSystemTime_ = other.serverSystemTime_;
+ serverUserTime_ = other.serverUserTime_;
+ clientSystemTime_ = other.clientSystemTime_;
+ clientUserTime_ = other.clientUserTime_;
+ latency50_ = other.latency50_;
+ latency90_ = other.latency90_;
+ latency95_ = other.latency95_;
+ latency99_ = other.latency99_;
+ latency999_ = other.latency999_;
+ }
+
+ public ScenarioResultSummary Clone() {
+ return new ScenarioResultSummary(this);
+ }
+
+ /// <summary>Field number for the "qps" field.</summary>
+ public const int QpsFieldNumber = 1;
+ private double qps_;
+ /// <summary>
+ /// Total number of operations per second over all clients.
+ /// </summary>
+ public double Qps {
+ get { return qps_; }
+ set {
+ qps_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "qps_per_server_core" field.</summary>
+ public const int QpsPerServerCoreFieldNumber = 2;
+ private double qpsPerServerCore_;
+ /// <summary>
+ /// QPS per one server core.
+ /// </summary>
+ public double QpsPerServerCore {
+ get { return qpsPerServerCore_; }
+ set {
+ qpsPerServerCore_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "server_system_time" field.</summary>
+ public const int ServerSystemTimeFieldNumber = 3;
+ private double serverSystemTime_;
+ /// <summary>
+ /// server load based on system_time (0.85 => 85%)
+ /// </summary>
+ public double ServerSystemTime {
+ get { return serverSystemTime_; }
+ set {
+ serverSystemTime_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "server_user_time" field.</summary>
+ public const int ServerUserTimeFieldNumber = 4;
+ private double serverUserTime_;
+ /// <summary>
+ /// server load based on user_time (0.85 => 85%)
+ /// </summary>
+ public double ServerUserTime {
+ get { return serverUserTime_; }
+ set {
+ serverUserTime_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "client_system_time" field.</summary>
+ public const int ClientSystemTimeFieldNumber = 5;
+ private double clientSystemTime_;
+ /// <summary>
+ /// client load based on system_time (0.85 => 85%)
+ /// </summary>
+ public double ClientSystemTime {
+ get { return clientSystemTime_; }
+ set {
+ clientSystemTime_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "client_user_time" field.</summary>
+ public const int ClientUserTimeFieldNumber = 6;
+ private double clientUserTime_;
+ /// <summary>
+ /// client load based on user_time (0.85 => 85%)
+ /// </summary>
+ public double ClientUserTime {
+ get { return clientUserTime_; }
+ set {
+ clientUserTime_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "latency_50" field.</summary>
+ public const int Latency50FieldNumber = 7;
+ private double latency50_;
+ /// <summary>
+ /// X% latency percentiles (in nanoseconds)
+ /// </summary>
+ public double Latency50 {
+ get { return latency50_; }
+ set {
+ latency50_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "latency_90" field.</summary>
+ public const int Latency90FieldNumber = 8;
+ private double latency90_;
+ public double Latency90 {
+ get { return latency90_; }
+ set {
+ latency90_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "latency_95" field.</summary>
+ public const int Latency95FieldNumber = 9;
+ private double latency95_;
+ public double Latency95 {
+ get { return latency95_; }
+ set {
+ latency95_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "latency_99" field.</summary>
+ public const int Latency99FieldNumber = 10;
+ private double latency99_;
+ public double Latency99 {
+ get { return latency99_; }
+ set {
+ latency99_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "latency_999" field.</summary>
+ public const int Latency999FieldNumber = 11;
+ private double latency999_;
+ public double Latency999 {
+ get { return latency999_; }
+ set {
+ latency999_ = value;
+ }
+ }
+
+ public override bool Equals(object other) {
+ return Equals(other as ScenarioResultSummary);
+ }
+
+ public bool Equals(ScenarioResultSummary other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Qps != other.Qps) return false;
+ if (QpsPerServerCore != other.QpsPerServerCore) return false;
+ if (ServerSystemTime != other.ServerSystemTime) return false;
+ if (ServerUserTime != other.ServerUserTime) return false;
+ if (ClientSystemTime != other.ClientSystemTime) return false;
+ if (ClientUserTime != other.ClientUserTime) return false;
+ if (Latency50 != other.Latency50) return false;
+ if (Latency90 != other.Latency90) return false;
+ if (Latency95 != other.Latency95) return false;
+ if (Latency99 != other.Latency99) return false;
+ if (Latency999 != other.Latency999) return false;
+ return true;
+ }
+
+ public override int GetHashCode() {
+ int hash = 1;
+ if (Qps != 0D) hash ^= Qps.GetHashCode();
+ if (QpsPerServerCore != 0D) hash ^= QpsPerServerCore.GetHashCode();
+ if (ServerSystemTime != 0D) hash ^= ServerSystemTime.GetHashCode();
+ if (ServerUserTime != 0D) hash ^= ServerUserTime.GetHashCode();
+ if (ClientSystemTime != 0D) hash ^= ClientSystemTime.GetHashCode();
+ if (ClientUserTime != 0D) hash ^= ClientUserTime.GetHashCode();
+ if (Latency50 != 0D) hash ^= Latency50.GetHashCode();
+ if (Latency90 != 0D) hash ^= Latency90.GetHashCode();
+ if (Latency95 != 0D) hash ^= Latency95.GetHashCode();
+ if (Latency99 != 0D) hash ^= Latency99.GetHashCode();
+ if (Latency999 != 0D) hash ^= Latency999.GetHashCode();
+ return hash;
+ }
+
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (Qps != 0D) {
+ output.WriteRawTag(9);
+ output.WriteDouble(Qps);
+ }
+ if (QpsPerServerCore != 0D) {
+ output.WriteRawTag(17);
+ output.WriteDouble(QpsPerServerCore);
+ }
+ if (ServerSystemTime != 0D) {
+ output.WriteRawTag(25);
+ output.WriteDouble(ServerSystemTime);
+ }
+ if (ServerUserTime != 0D) {
+ output.WriteRawTag(33);
+ output.WriteDouble(ServerUserTime);
+ }
+ if (ClientSystemTime != 0D) {
+ output.WriteRawTag(41);
+ output.WriteDouble(ClientSystemTime);
+ }
+ if (ClientUserTime != 0D) {
+ output.WriteRawTag(49);
+ output.WriteDouble(ClientUserTime);
+ }
+ if (Latency50 != 0D) {
+ output.WriteRawTag(57);
+ output.WriteDouble(Latency50);
+ }
+ if (Latency90 != 0D) {
+ output.WriteRawTag(65);
+ output.WriteDouble(Latency90);
+ }
+ if (Latency95 != 0D) {
+ output.WriteRawTag(73);
+ output.WriteDouble(Latency95);
+ }
+ if (Latency99 != 0D) {
+ output.WriteRawTag(81);
+ output.WriteDouble(Latency99);
+ }
+ if (Latency999 != 0D) {
+ output.WriteRawTag(89);
+ output.WriteDouble(Latency999);
+ }
+ }
+
+ public int CalculateSize() {
+ int size = 0;
+ if (Qps != 0D) {
+ size += 1 + 8;
+ }
+ if (QpsPerServerCore != 0D) {
+ size += 1 + 8;
+ }
+ if (ServerSystemTime != 0D) {
+ size += 1 + 8;
+ }
+ if (ServerUserTime != 0D) {
+ size += 1 + 8;
+ }
+ if (ClientSystemTime != 0D) {
+ size += 1 + 8;
+ }
+ if (ClientUserTime != 0D) {
+ size += 1 + 8;
+ }
+ if (Latency50 != 0D) {
+ size += 1 + 8;
+ }
+ if (Latency90 != 0D) {
+ size += 1 + 8;
+ }
+ if (Latency95 != 0D) {
+ size += 1 + 8;
+ }
+ if (Latency99 != 0D) {
+ size += 1 + 8;
+ }
+ if (Latency999 != 0D) {
+ size += 1 + 8;
+ }
+ return size;
+ }
+
+ public void MergeFrom(ScenarioResultSummary other) {
+ if (other == null) {
+ return;
+ }
+ if (other.Qps != 0D) {
+ Qps = other.Qps;
+ }
+ if (other.QpsPerServerCore != 0D) {
+ QpsPerServerCore = other.QpsPerServerCore;
+ }
+ if (other.ServerSystemTime != 0D) {
+ ServerSystemTime = other.ServerSystemTime;
+ }
+ if (other.ServerUserTime != 0D) {
+ ServerUserTime = other.ServerUserTime;
+ }
+ if (other.ClientSystemTime != 0D) {
+ ClientSystemTime = other.ClientSystemTime;
+ }
+ if (other.ClientUserTime != 0D) {
+ ClientUserTime = other.ClientUserTime;
+ }
+ if (other.Latency50 != 0D) {
+ Latency50 = other.Latency50;
+ }
+ if (other.Latency90 != 0D) {
+ Latency90 = other.Latency90;
+ }
+ if (other.Latency95 != 0D) {
+ Latency95 = other.Latency95;
+ }
+ if (other.Latency99 != 0D) {
+ Latency99 = other.Latency99;
+ }
+ if (other.Latency999 != 0D) {
+ Latency999 = other.Latency999;
+ }
+ }
+
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ input.SkipLastField();
+ break;
+ case 9: {
+ Qps = input.ReadDouble();
+ break;
+ }
+ case 17: {
+ QpsPerServerCore = input.ReadDouble();
+ break;
+ }
+ case 25: {
+ ServerSystemTime = input.ReadDouble();
+ break;
+ }
+ case 33: {
+ ServerUserTime = input.ReadDouble();
+ break;
+ }
+ case 41: {
+ ClientSystemTime = input.ReadDouble();
+ break;
+ }
+ case 49: {
+ ClientUserTime = input.ReadDouble();
+ break;
+ }
+ case 57: {
+ Latency50 = input.ReadDouble();
+ break;
+ }
+ case 65: {
+ Latency90 = input.ReadDouble();
+ break;
+ }
+ case 73: {
+ Latency95 = input.ReadDouble();
+ break;
+ }
+ case 81: {
+ Latency99 = input.ReadDouble();
+ break;
+ }
+ case 89: {
+ Latency999 = input.ReadDouble();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ /// <summary>
+ /// Results of a single benchmark scenario.
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class ScenarioResult : pb::IMessage<ScenarioResult> {
+ private static readonly pb::MessageParser<ScenarioResult> _parser = new pb::MessageParser<ScenarioResult>(() => new ScenarioResult());
+ public static pb::MessageParser<ScenarioResult> Parser { get { return _parser; } }
+
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[17]; }
+ }
+
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ public ScenarioResult() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ public ScenarioResult(ScenarioResult other) : this() {
+ Scenario = other.scenario_ != null ? other.Scenario.Clone() : null;
+ Latencies = other.latencies_ != null ? other.Latencies.Clone() : null;
+ clientStats_ = other.clientStats_.Clone();
+ serverStats_ = other.serverStats_.Clone();
+ serverCores_ = other.serverCores_.Clone();
+ Summary = other.summary_ != null ? other.Summary.Clone() : null;
+ }
+
+ public ScenarioResult Clone() {
+ return new ScenarioResult(this);
+ }
+
+ /// <summary>Field number for the "scenario" field.</summary>
+ public const int ScenarioFieldNumber = 1;
+ private global::Grpc.Testing.Scenario scenario_;
+ /// <summary>
+ /// Inputs used to run the scenario.
+ /// </summary>
+ public global::Grpc.Testing.Scenario Scenario {
+ get { return scenario_; }
+ set {
+ scenario_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "latencies" field.</summary>
+ public const int LatenciesFieldNumber = 2;
+ private global::Grpc.Testing.HistogramData latencies_;
+ /// <summary>
+ /// Histograms from all clients merged into one histogram.
+ /// </summary>
+ public global::Grpc.Testing.HistogramData Latencies {
+ get { return latencies_; }
+ set {
+ latencies_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "client_stats" field.</summary>
+ public const int ClientStatsFieldNumber = 3;
+ private static readonly pb::FieldCodec<global::Grpc.Testing.ClientStats> _repeated_clientStats_codec
+ = pb::FieldCodec.ForMessage(26, global::Grpc.Testing.ClientStats.Parser);
+ private readonly pbc::RepeatedField<global::Grpc.Testing.ClientStats> clientStats_ = new pbc::RepeatedField<global::Grpc.Testing.ClientStats>();
+ /// <summary>
+ /// Client stats for each client
+ /// </summary>
+ public pbc::RepeatedField<global::Grpc.Testing.ClientStats> ClientStats {
+ get { return clientStats_; }
+ }
+
+ /// <summary>Field number for the "server_stats" field.</summary>
+ public const int ServerStatsFieldNumber = 4;
+ private static readonly pb::FieldCodec<global::Grpc.Testing.ServerStats> _repeated_serverStats_codec
+ = pb::FieldCodec.ForMessage(34, global::Grpc.Testing.ServerStats.Parser);
+ private readonly pbc::RepeatedField<global::Grpc.Testing.ServerStats> serverStats_ = new pbc::RepeatedField<global::Grpc.Testing.ServerStats>();
+ /// <summary>
+ /// Server stats for each server
+ /// </summary>
+ public pbc::RepeatedField<global::Grpc.Testing.ServerStats> ServerStats {
+ get { return serverStats_; }
+ }
+
+ /// <summary>Field number for the "server_cores" field.</summary>
+ public const int ServerCoresFieldNumber = 5;
+ private static readonly pb::FieldCodec<int> _repeated_serverCores_codec
+ = pb::FieldCodec.ForInt32(42);
+ private readonly pbc::RepeatedField<int> serverCores_ = new pbc::RepeatedField<int>();
+ /// <summary>
+ /// Number of cores available to each server
+ /// </summary>
+ public pbc::RepeatedField<int> ServerCores {
+ get { return serverCores_; }
+ }
+
+ /// <summary>Field number for the "summary" field.</summary>
+ public const int SummaryFieldNumber = 6;
+ private global::Grpc.Testing.ScenarioResultSummary summary_;
+ /// <summary>
+ /// An after-the-fact computed summary
+ /// </summary>
+ public global::Grpc.Testing.ScenarioResultSummary Summary {
+ get { return summary_; }
+ set {
+ summary_ = value;
+ }
+ }
+
+ public override bool Equals(object other) {
+ return Equals(other as ScenarioResult);
+ }
+
+ public bool Equals(ScenarioResult other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!object.Equals(Scenario, other.Scenario)) return false;
+ if (!object.Equals(Latencies, other.Latencies)) return false;
+ if(!clientStats_.Equals(other.clientStats_)) return false;
+ if(!serverStats_.Equals(other.serverStats_)) return false;
+ if(!serverCores_.Equals(other.serverCores_)) return false;
+ if (!object.Equals(Summary, other.Summary)) return false;
+ return true;
+ }
+
+ public override int GetHashCode() {
+ int hash = 1;
+ if (scenario_ != null) hash ^= Scenario.GetHashCode();
+ if (latencies_ != null) hash ^= Latencies.GetHashCode();
+ hash ^= clientStats_.GetHashCode();
+ hash ^= serverStats_.GetHashCode();
+ hash ^= serverCores_.GetHashCode();
+ if (summary_ != null) hash ^= Summary.GetHashCode();
+ return hash;
+ }
+
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (scenario_ != null) {
+ output.WriteRawTag(10);
+ output.WriteMessage(Scenario);
+ }
+ if (latencies_ != null) {
+ output.WriteRawTag(18);
+ output.WriteMessage(Latencies);
+ }
+ clientStats_.WriteTo(output, _repeated_clientStats_codec);
+ serverStats_.WriteTo(output, _repeated_serverStats_codec);
+ serverCores_.WriteTo(output, _repeated_serverCores_codec);
+ if (summary_ != null) {
+ output.WriteRawTag(50);
+ output.WriteMessage(Summary);
+ }
+ }
+
+ public int CalculateSize() {
+ int size = 0;
+ if (scenario_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(Scenario);
+ }
+ if (latencies_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(Latencies);
+ }
+ size += clientStats_.CalculateSize(_repeated_clientStats_codec);
+ size += serverStats_.CalculateSize(_repeated_serverStats_codec);
+ size += serverCores_.CalculateSize(_repeated_serverCores_codec);
+ if (summary_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(Summary);
+ }
+ return size;
+ }
+
+ public void MergeFrom(ScenarioResult other) {
+ if (other == null) {
+ return;
+ }
+ if (other.scenario_ != null) {
+ if (scenario_ == null) {
+ scenario_ = new global::Grpc.Testing.Scenario();
+ }
+ Scenario.MergeFrom(other.Scenario);
+ }
+ if (other.latencies_ != null) {
+ if (latencies_ == null) {
+ latencies_ = new global::Grpc.Testing.HistogramData();
+ }
+ Latencies.MergeFrom(other.Latencies);
+ }
+ clientStats_.Add(other.clientStats_);
+ serverStats_.Add(other.serverStats_);
+ serverCores_.Add(other.serverCores_);
+ if (other.summary_ != null) {
+ if (summary_ == null) {
+ summary_ = new global::Grpc.Testing.ScenarioResultSummary();
+ }
+ Summary.MergeFrom(other.Summary);
+ }
+ }
+
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ input.SkipLastField();
+ break;
+ case 10: {
+ if (scenario_ == null) {
+ scenario_ = new global::Grpc.Testing.Scenario();
+ }
+ input.ReadMessage(scenario_);
+ break;
+ }
+ case 18: {
+ if (latencies_ == null) {
+ latencies_ = new global::Grpc.Testing.HistogramData();
+ }
+ input.ReadMessage(latencies_);
+ break;
+ }
+ case 26: {
+ clientStats_.AddEntriesFrom(input, _repeated_clientStats_codec);
+ break;
+ }
+ case 34: {
+ serverStats_.AddEntriesFrom(input, _repeated_serverStats_codec);
+ break;
+ }
+ case 42:
+ case 40: {
+ serverCores_.AddEntriesFrom(input, _repeated_serverCores_codec);
+ break;
+ }
+ case 50: {
+ if (summary_ == null) {
+ summary_ = new global::Grpc.Testing.ScenarioResultSummary();
+ }
+ input.ReadMessage(summary_);
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
#endregion
}
diff --git a/src/csharp/Grpc.IntegrationTesting/Messages.cs b/src/csharp/Grpc.IntegrationTesting/Messages.cs
index 7ca47860f6..fcff475941 100644
--- a/src/csharp/Grpc.IntegrationTesting/Messages.cs
+++ b/src/csharp/Grpc.IntegrationTesting/Messages.cs
@@ -47,11 +47,12 @@ namespace Grpc.Testing {
"c3Npb24YBiABKA4yHS5ncnBjLnRlc3RpbmcuQ29tcHJlc3Npb25UeXBlEjEK",
"D3Jlc3BvbnNlX3N0YXR1cxgHIAEoCzIYLmdycGMudGVzdGluZy5FY2hvU3Rh",
"dHVzIkUKG1N0cmVhbWluZ091dHB1dENhbGxSZXNwb25zZRImCgdwYXlsb2Fk",
- "GAEgASgLMhUuZ3JwYy50ZXN0aW5nLlBheWxvYWQiMwoNUmVjb25uZWN0SW5m",
- "bxIOCgZwYXNzZWQYASABKAgSEgoKYmFja29mZl9tcxgCIAMoBSo/CgtQYXls",
- "b2FkVHlwZRIQCgxDT01QUkVTU0FCTEUQABISCg5VTkNPTVBSRVNTQUJMRRAB",
- "EgoKBlJBTkRPTRACKjIKD0NvbXByZXNzaW9uVHlwZRIICgROT05FEAASCAoE",
- "R1pJUBABEgsKB0RFRkxBVEUQAmIGcHJvdG8z"));
+ "GAEgASgLMhUuZ3JwYy50ZXN0aW5nLlBheWxvYWQiMwoPUmVjb25uZWN0UGFy",
+ "YW1zEiAKGG1heF9yZWNvbm5lY3RfYmFja29mZl9tcxgBIAEoBSIzCg1SZWNv",
+ "bm5lY3RJbmZvEg4KBnBhc3NlZBgBIAEoCBISCgpiYWNrb2ZmX21zGAIgAygF",
+ "Kj8KC1BheWxvYWRUeXBlEhAKDENPTVBSRVNTQUJMRRAAEhIKDlVOQ09NUFJF",
+ "U1NBQkxFEAESCgoGUkFORE9NEAIqMgoPQ29tcHJlc3Npb25UeXBlEggKBE5P",
+ "TkUQABIICgRHWklQEAESCwoHREVGTEFURRACYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedCodeInfo(new[] {typeof(global::Grpc.Testing.PayloadType), typeof(global::Grpc.Testing.CompressionType), }, new pbr::GeneratedCodeInfo[] {
@@ -64,6 +65,7 @@ namespace Grpc.Testing {
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ResponseParameters), global::Grpc.Testing.ResponseParameters.Parser, new[]{ "Size", "IntervalUs" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.StreamingOutputCallRequest), global::Grpc.Testing.StreamingOutputCallRequest.Parser, new[]{ "ResponseType", "ResponseParameters", "Payload", "ResponseCompression", "ResponseStatus" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.StreamingOutputCallResponse), global::Grpc.Testing.StreamingOutputCallResponse.Parser, new[]{ "Payload" }, null, null, null),
+ new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ReconnectParams), global::Grpc.Testing.ReconnectParams.Parser, new[]{ "MaxReconnectBackoffMs" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ReconnectInfo), global::Grpc.Testing.ReconnectInfo.Parser, new[]{ "Passed", "BackoffMs" }, null, null, null)
}));
}
@@ -1574,6 +1576,113 @@ namespace Grpc.Testing {
/// <summary>
/// For reconnect interop test only.
+ /// Client tells server what reconnection parameters it used.
+ /// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public sealed partial class ReconnectParams : pb::IMessage<ReconnectParams> {
+ private static readonly pb::MessageParser<ReconnectParams> _parser = new pb::MessageParser<ReconnectParams>(() => new ReconnectParams());
+ public static pb::MessageParser<ReconnectParams> Parser { get { return _parser; } }
+
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[9]; }
+ }
+
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ public ReconnectParams() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ public ReconnectParams(ReconnectParams other) : this() {
+ maxReconnectBackoffMs_ = other.maxReconnectBackoffMs_;
+ }
+
+ public ReconnectParams Clone() {
+ return new ReconnectParams(this);
+ }
+
+ /// <summary>Field number for the "max_reconnect_backoff_ms" field.</summary>
+ public const int MaxReconnectBackoffMsFieldNumber = 1;
+ private int maxReconnectBackoffMs_;
+ public int MaxReconnectBackoffMs {
+ get { return maxReconnectBackoffMs_; }
+ set {
+ maxReconnectBackoffMs_ = value;
+ }
+ }
+
+ public override bool Equals(object other) {
+ return Equals(other as ReconnectParams);
+ }
+
+ public bool Equals(ReconnectParams other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (MaxReconnectBackoffMs != other.MaxReconnectBackoffMs) return false;
+ return true;
+ }
+
+ public override int GetHashCode() {
+ int hash = 1;
+ if (MaxReconnectBackoffMs != 0) hash ^= MaxReconnectBackoffMs.GetHashCode();
+ return hash;
+ }
+
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (MaxReconnectBackoffMs != 0) {
+ output.WriteRawTag(8);
+ output.WriteInt32(MaxReconnectBackoffMs);
+ }
+ }
+
+ public int CalculateSize() {
+ int size = 0;
+ if (MaxReconnectBackoffMs != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxReconnectBackoffMs);
+ }
+ return size;
+ }
+
+ public void MergeFrom(ReconnectParams other) {
+ if (other == null) {
+ return;
+ }
+ if (other.MaxReconnectBackoffMs != 0) {
+ MaxReconnectBackoffMs = other.MaxReconnectBackoffMs;
+ }
+ }
+
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ input.SkipLastField();
+ break;
+ case 8: {
+ MaxReconnectBackoffMs = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ /// <summary>
+ /// For reconnect interop test only.
/// Server tells client whether its reconnects are following the spec and the
/// reconnect backoffs it saw.
/// </summary>
@@ -1583,7 +1692,7 @@ namespace Grpc.Testing {
public static pb::MessageParser<ReconnectInfo> Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
- get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[9]; }
+ get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[10]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
diff --git a/src/csharp/Grpc.IntegrationTesting/Test.cs b/src/csharp/Grpc.IntegrationTesting/Test.cs
index 91e0a1e04c..363f6444ec 100644
--- a/src/csharp/Grpc.IntegrationTesting/Test.cs
+++ b/src/csharp/Grpc.IntegrationTesting/Test.cs
@@ -40,10 +40,10 @@ namespace Grpc.Testing {
"bWluZ091dHB1dENhbGxSZXF1ZXN0GikuZ3JwYy50ZXN0aW5nLlN0cmVhbWlu",
"Z091dHB1dENhbGxSZXNwb25zZSgBMAEyVQoUVW5pbXBsZW1lbnRlZFNlcnZp",
"Y2USPQoRVW5pbXBsZW1lbnRlZENhbGwSEy5ncnBjLnRlc3RpbmcuRW1wdHka",
- "Ey5ncnBjLnRlc3RpbmcuRW1wdHkyfwoQUmVjb25uZWN0U2VydmljZRIxCgVT",
- "dGFydBITLmdycGMudGVzdGluZy5FbXB0eRoTLmdycGMudGVzdGluZy5FbXB0",
- "eRI4CgRTdG9wEhMuZ3JwYy50ZXN0aW5nLkVtcHR5GhsuZ3JwYy50ZXN0aW5n",
- "LlJlY29ubmVjdEluZm9iBnByb3RvMw=="));
+ "Ey5ncnBjLnRlc3RpbmcuRW1wdHkyiQEKEFJlY29ubmVjdFNlcnZpY2USOwoF",
+ "U3RhcnQSHS5ncnBjLnRlc3RpbmcuUmVjb25uZWN0UGFyYW1zGhMuZ3JwYy50",
+ "ZXN0aW5nLkVtcHR5EjgKBFN0b3ASEy5ncnBjLnRlc3RpbmcuRW1wdHkaGy5n",
+ "cnBjLnRlc3RpbmcuUmVjb25uZWN0SW5mb2IGcHJvdG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Grpc.Testing.EmptyReflection.Descriptor, global::Grpc.Testing.MessagesReflection.Descriptor, },
new pbr::GeneratedCodeInfo(null, null));
diff --git a/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs b/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs
index b84ec2d984..31746cbe71 100644
--- a/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs
+++ b/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs
@@ -367,14 +367,15 @@ namespace Grpc.Testing {
{
static readonly string __ServiceName = "grpc.testing.ReconnectService";
+ static readonly Marshaller<global::Grpc.Testing.ReconnectParams> __Marshaller_ReconnectParams = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ReconnectParams.Parser.ParseFrom);
static readonly Marshaller<global::Grpc.Testing.Empty> __Marshaller_Empty = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Empty.Parser.ParseFrom);
static readonly Marshaller<global::Grpc.Testing.ReconnectInfo> __Marshaller_ReconnectInfo = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ReconnectInfo.Parser.ParseFrom);
- static readonly Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty> __Method_Start = new Method<global::Grpc.Testing.Empty, global::Grpc.Testing.Empty>(
+ static readonly Method<global::Grpc.Testing.ReconnectParams, global::Grpc.Testing.Empty> __Method_Start = new Method<global::Grpc.Testing.ReconnectParams, global::Grpc.Testing.Empty>(
MethodType.Unary,
__ServiceName,
"Start",
- __Marshaller_Empty,
+ __Marshaller_ReconnectParams,
__Marshaller_Empty);
static readonly Method<global::Grpc.Testing.Empty, global::Grpc.Testing.ReconnectInfo> __Method_Stop = new Method<global::Grpc.Testing.Empty, global::Grpc.Testing.ReconnectInfo>(
@@ -394,10 +395,10 @@ namespace Grpc.Testing {
[System.Obsolete("Client side interfaced will be removed in the next release. Use client class directly.")]
public interface IReconnectServiceClient
{
- global::Grpc.Testing.Empty Start(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
- global::Grpc.Testing.Empty Start(global::Grpc.Testing.Empty request, CallOptions options);
- AsyncUnaryCall<global::Grpc.Testing.Empty> StartAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
- AsyncUnaryCall<global::Grpc.Testing.Empty> StartAsync(global::Grpc.Testing.Empty request, CallOptions options);
+ global::Grpc.Testing.Empty Start(global::Grpc.Testing.ReconnectParams request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
+ global::Grpc.Testing.Empty Start(global::Grpc.Testing.ReconnectParams request, CallOptions options);
+ AsyncUnaryCall<global::Grpc.Testing.Empty> StartAsync(global::Grpc.Testing.ReconnectParams request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
+ AsyncUnaryCall<global::Grpc.Testing.Empty> StartAsync(global::Grpc.Testing.ReconnectParams request, CallOptions options);
global::Grpc.Testing.ReconnectInfo Stop(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
global::Grpc.Testing.ReconnectInfo Stop(global::Grpc.Testing.Empty request, CallOptions options);
AsyncUnaryCall<global::Grpc.Testing.ReconnectInfo> StopAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
@@ -408,14 +409,14 @@ namespace Grpc.Testing {
[System.Obsolete("Service implementations should inherit from the generated abstract base class instead.")]
public interface IReconnectService
{
- Task<global::Grpc.Testing.Empty> Start(global::Grpc.Testing.Empty request, ServerCallContext context);
+ Task<global::Grpc.Testing.Empty> Start(global::Grpc.Testing.ReconnectParams request, ServerCallContext context);
Task<global::Grpc.Testing.ReconnectInfo> Stop(global::Grpc.Testing.Empty request, ServerCallContext context);
}
// server-side abstract class
public abstract class ReconnectServiceBase
{
- public virtual Task<global::Grpc.Testing.Empty> Start(global::Grpc.Testing.Empty request, ServerCallContext context)
+ public virtual Task<global::Grpc.Testing.Empty> Start(global::Grpc.Testing.ReconnectParams request, ServerCallContext context)
{
throw new RpcException(new Status(StatusCode.Unimplemented, ""));
}
@@ -445,19 +446,19 @@ namespace Grpc.Testing {
{
}
- public virtual global::Grpc.Testing.Empty Start(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
+ public virtual global::Grpc.Testing.Empty Start(global::Grpc.Testing.ReconnectParams request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
{
return Start(request, new CallOptions(headers, deadline, cancellationToken));
}
- public virtual global::Grpc.Testing.Empty Start(global::Grpc.Testing.Empty request, CallOptions options)
+ public virtual global::Grpc.Testing.Empty Start(global::Grpc.Testing.ReconnectParams request, CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_Start, null, options, request);
}
- public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> StartAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
+ public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> StartAsync(global::Grpc.Testing.ReconnectParams request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
{
return StartAsync(request, new CallOptions(headers, deadline, cancellationToken));
}
- public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> StartAsync(global::Grpc.Testing.Empty request, CallOptions options)
+ public virtual AsyncUnaryCall<global::Grpc.Testing.Empty> StartAsync(global::Grpc.Testing.ReconnectParams request, CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_Start, null, options, request);
}
diff --git a/src/node/performance/worker.js b/src/node/performance/worker.js
index 98577bdbc9..7ef9b84fe7 100644
--- a/src/node/performance/worker.js
+++ b/src/node/performance/worker.js
@@ -33,6 +33,7 @@
'use strict';
+var console = require('console');
var worker_service_impl = require('./worker_service_impl');
var grpc = require('../../../');
@@ -48,6 +49,7 @@ function runServer(port) {
var address = '0.0.0.0:' + port;
server.bind(address, server_creds);
server.start();
+ console.log('running QPS worker on %s', address);
return server;
}
diff --git a/src/node/performance/worker_service_impl.js b/src/node/performance/worker_service_impl.js
index 17458e4b93..4b5cb8f9c2 100644
--- a/src/node/performance/worker_service_impl.js
+++ b/src/node/performance/worker_service_impl.js
@@ -34,6 +34,7 @@
'use strict';
var os = require('os');
+var console = require('console');
var BenchmarkClient = require('./benchmark_client');
var BenchmarkServer = require('./benchmark_server');
@@ -49,6 +50,7 @@ exports.runClient = function runClient(call) {
switch (request.argtype) {
case 'setup':
var setup = request.setup;
+ console.log('ClientConfig %j', setup);
client = new BenchmarkClient(setup.server_targets,
setup.client_channels,
setup.histogram_params,
@@ -118,6 +120,7 @@ exports.runServer = function runServer(call) {
var stats;
switch (request.argtype) {
case 'setup':
+ console.log('ServerConfig %j', request.setup);
server = new BenchmarkServer('[::]', request.setup.port,
request.setup.security_params);
server.start();
diff --git a/src/php/tests/bootstrap.php b/src/php/tests/bootstrap.php
index b61f2c40a5..8b3d4347e2 100644
--- a/src/php/tests/bootstrap.php
+++ b/src/php/tests/bootstrap.php
@@ -17,5 +17,5 @@
*/
error_reporting(E_ALL | E_STRICT);
-require dirname(__DIR__) . '/vendor/autoload.php';
+require dirname(__DIR__).'/vendor/autoload.php';
date_default_timezone_set('UTC');
diff --git a/src/php/tests/generated_code/GeneratedCodeWithCallbackTest.php b/src/php/tests/generated_code/GeneratedCodeWithCallbackTest.php
index 6bb1955ccb..6b70b8ac10 100644
--- a/src/php/tests/generated_code/GeneratedCodeWithCallbackTest.php
+++ b/src/php/tests/generated_code/GeneratedCodeWithCallbackTest.php
@@ -46,7 +46,8 @@ class GeneratedCodeWithCallbackTest extends AbstractGeneratedCodeTest
$a_copy['foo'] = ['bar'];
return $a_copy;
- }]);
+ },
+ ]);
}
public function tearDown()
diff --git a/src/php/tests/generated_code/math_client.php b/src/php/tests/generated_code/math_client.php
index b8652ceb08..6ee92bc465 100644
--- a/src/php/tests/generated_code/math_client.php
+++ b/src/php/tests/generated_code/math_client.php
@@ -38,13 +38,13 @@ include 'tests/generated_code/math.php';
function p($line)
{
- print("$line<br/>\n");
+ echo "$line<br/>\n";
}
$host = 'localhost:50051';
p("Connecting to host: $host");
$client = new math\MathClient($host, [
- 'credentials' => Grpc\ChannelCredentials::createInsecure()
+ 'credentials' => Grpc\ChannelCredentials::createInsecure(),
]);
p('Client class: '.get_class($client));
p('');
diff --git a/src/php/tests/unit_tests/CallCredentials3Test.php b/src/php/tests/unit_tests/CallCredentials3Test.php
index 6d98815d16..8f5e109bf5 100644
--- a/src/php/tests/unit_tests/CallCredentials3Test.php
+++ b/src/php/tests/unit_tests/CallCredentials3Test.php
@@ -132,5 +132,4 @@ class CallCredentials3Test extends PHPUnit_Framework_TestCase
unset($call);
unset($server_call);
}
-
}
diff --git a/src/php/tests/unit_tests/CallTest.php b/src/php/tests/unit_tests/CallTest.php
index 1170a440fa..fa026f0935 100755
--- a/src/php/tests/unit_tests/CallTest.php
+++ b/src/php/tests/unit_tests/CallTest.php
@@ -94,7 +94,7 @@ class CallTest extends PHPUnit_Framework_TestCase
public function testCancel()
{
- $this->assertNull($this->call->cancel());
+ $this->assertNull($this->call->cancel());
}
/**
@@ -118,5 +118,4 @@ class CallTest extends PHPUnit_Framework_TestCase
];
$result = $this->call->startBatch($batch);
}
-
}
diff --git a/src/php/tests/unit_tests/ChannelCredentialsTest.php b/src/php/tests/unit_tests/ChannelCredentialsTest.php
index 1a42d69428..56c1d8f006 100644
--- a/src/php/tests/unit_tests/ChannelCredentialsTest.php
+++ b/src/php/tests/unit_tests/ChannelCredentialsTest.php
@@ -70,4 +70,4 @@ class ChanellCredentialsTest extends PHPUnit_Framework_TestCase
$channel_credentials = Grpc\ChannelCredentials::createInsecure();
$this->assertNull($channel_credentials);
}
-} \ No newline at end of file
+}
diff --git a/src/php/tests/unit_tests/ChannelTest.php b/src/php/tests/unit_tests/ChannelTest.php
index b6eac3109a..a1f9053c39 100644
--- a/src/php/tests/unit_tests/ChannelTest.php
+++ b/src/php/tests/unit_tests/ChannelTest.php
@@ -78,5 +78,4 @@ class ChannelTest extends PHPUnit_Framework_TestCase
]
);
}
-
-} \ No newline at end of file
+}
diff --git a/src/php/tests/unit_tests/EndToEndTest.php b/src/php/tests/unit_tests/EndToEndTest.php
index 3fa92c950b..2b09f9d112 100755
--- a/src/php/tests/unit_tests/EndToEndTest.php
+++ b/src/php/tests/unit_tests/EndToEndTest.php
@@ -261,7 +261,8 @@ class EndToEndTest extends PHPUnit_Framework_TestCase
Grpc\OP_SEND_INITIAL_METADATA => [],
Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
Grpc\OP_SEND_MESSAGE => ['message' => 'abc',
- 'flags' => 'invalid'],
+ 'flags' => 'invalid',
+ ],
]);
}
@@ -574,7 +575,7 @@ class EndToEndTest extends PHPUnit_Framework_TestCase
public function testGetConnectivityStateInvalidParam()
{
$this->assertTrue($this->channel->getConnectivityState(
- new Grpc\Timeval));
+ new Grpc\Timeval()));
}
/**
@@ -591,12 +592,11 @@ class EndToEndTest extends PHPUnit_Framework_TestCase
*/
public function testChannelConstructorInvalidParam()
{
- $this->channel = new Grpc\Channel('localhost:'.$this->port, NULL);
+ $this->channel = new Grpc\Channel('localhost:'.$this->port, null);
}
public function testClose()
{
$this->assertNull($this->channel->close());
}
-
}
diff --git a/src/php/tests/unit_tests/ServerTest.php b/src/php/tests/unit_tests/ServerTest.php
index d18f9abe9b..76aaa06970 100644
--- a/src/php/tests/unit_tests/ServerTest.php
+++ b/src/php/tests/unit_tests/ServerTest.php
@@ -67,5 +67,4 @@ class ServerTest extends PHPUnit_Framework_TestCase
$this->server = new Grpc\Server([]);
$this->port = $this->server->addSecureHttp2Port(['0.0.0.0:0']);
}
-
-} \ No newline at end of file
+}
diff --git a/src/php/tests/unit_tests/TimevalTest.php b/src/php/tests/unit_tests/TimevalTest.php
index 43abba126a..a3dbce079f 100755
--- a/src/php/tests/unit_tests/TimevalTest.php
+++ b/src/php/tests/unit_tests/TimevalTest.php
@@ -94,13 +94,13 @@ class TimevalTest extends PHPUnit_Framework_TestCase
public function testSimilar()
{
- $a = Grpc\Timeval::now();
- $delta = new Grpc\Timeval(1000);
- $b = $a->add($delta);
- $thresh = new Grpc\Timeval(1100);
- $this->assertTrue(Grpc\Timeval::similar($a, $b, $thresh));
- $thresh = new Grpc\Timeval(900);
- $this->assertFalse(Grpc\Timeval::similar($a, $b, $thresh));
+ $a = Grpc\Timeval::now();
+ $delta = new Grpc\Timeval(1000);
+ $b = $a->add($delta);
+ $thresh = new Grpc\Timeval(1100);
+ $this->assertTrue(Grpc\Timeval::similar($a, $b, $thresh));
+ $thresh = new Grpc\Timeval(900);
+ $this->assertFalse(Grpc\Timeval::similar($a, $b, $thresh));
}
public function testSleepUntil()
@@ -155,5 +155,4 @@ class TimevalTest extends PHPUnit_Framework_TestCase
{
$a = Grpc\Timeval::similar(1000, 1100, 1200);
}
-
}
diff --git a/src/proto/grpc/testing/control.proto b/src/proto/grpc/testing/control.proto
index 458b19c4d6..28769ef653 100644
--- a/src/proto/grpc/testing/control.proto
+++ b/src/proto/grpc/testing/control.proto
@@ -57,18 +57,6 @@ message PoissonParams {
double offered_load = 1;
}
-message UniformParams {
- double interarrival_lo = 1;
- double interarrival_hi = 2;
-}
-
-message DeterministicParams { double offered_load = 1; }
-
-message ParetoParams {
- double interarrival_base = 1;
- double alpha = 2;
-}
-
// Once an RPC finishes, immediately start a new one.
// No configuration parameters needed.
message ClosedLoopParams {}
@@ -77,9 +65,6 @@ message LoadParams {
oneof load {
ClosedLoopParams closed_loop = 1;
PoissonParams poisson = 2;
- UniformParams uniform = 3;
- DeterministicParams determ = 4;
- ParetoParams pareto = 5;
};
}
@@ -194,3 +179,44 @@ message Scenario {
message Scenarios {
repeated Scenario scenarios = 1;
}
+
+// Basic summary that can be computed from ClientStats and ServerStats
+// once the scenario has finished.
+message ScenarioResultSummary
+{
+ // Total number of operations per second over all clients.
+ double qps = 1;
+ // QPS per one server core.
+ double qps_per_server_core = 2;
+ // server load based on system_time (0.85 => 85%)
+ double server_system_time = 3;
+ // server load based on user_time (0.85 => 85%)
+ double server_user_time = 4;
+ // client load based on system_time (0.85 => 85%)
+ double client_system_time = 5;
+ // client load based on user_time (0.85 => 85%)
+ double client_user_time = 6;
+
+ // X% latency percentiles (in nanoseconds)
+ double latency_50 = 7;
+ double latency_90 = 8;
+ double latency_95 = 9;
+ double latency_99 = 10;
+ double latency_999 = 11;
+}
+
+// Results of a single benchmark scenario.
+message ScenarioResult {
+ // Inputs used to run the scenario.
+ Scenario scenario = 1;
+ // Histograms from all clients merged into one histogram.
+ HistogramData latencies = 2;
+ // Client stats for each client
+ repeated ClientStats client_stats = 3;
+ // Server stats for each server
+ repeated ServerStats server_stats = 4;
+ // Number of cores available to each server
+ repeated int32 server_cores = 5;
+ // An after-the-fact computed summary
+ ScenarioResultSummary summary = 6;
+}
diff --git a/src/python/grpcio/grpc/_cython/imports.generated.c b/src/python/grpcio/grpc/_cython/imports.generated.c
index 8bd6ae6372..3922f43833 100644
--- a/src/python/grpcio/grpc/_cython/imports.generated.c
+++ b/src/python/grpcio/grpc/_cython/imports.generated.c
@@ -174,6 +174,8 @@ grpc_byte_buffer_reader_readall_type grpc_byte_buffer_reader_readall_import;
grpc_raw_byte_buffer_from_reader_type grpc_raw_byte_buffer_from_reader_import;
gpr_log_type gpr_log_import;
gpr_log_message_type gpr_log_message_import;
+gpr_set_log_verbosity_type gpr_set_log_verbosity_import;
+gpr_log_verbosity_init_type gpr_log_verbosity_init_import;
gpr_set_log_function_type gpr_set_log_function_import;
gpr_slice_ref_type gpr_slice_ref_import;
gpr_slice_unref_type gpr_slice_unref_import;
@@ -440,6 +442,8 @@ void pygrpc_load_imports(HMODULE library) {
grpc_raw_byte_buffer_from_reader_import = (grpc_raw_byte_buffer_from_reader_type) GetProcAddress(library, "grpc_raw_byte_buffer_from_reader");
gpr_log_import = (gpr_log_type) GetProcAddress(library, "gpr_log");
gpr_log_message_import = (gpr_log_message_type) GetProcAddress(library, "gpr_log_message");
+ gpr_set_log_verbosity_import = (gpr_set_log_verbosity_type) GetProcAddress(library, "gpr_set_log_verbosity");
+ gpr_log_verbosity_init_import = (gpr_log_verbosity_init_type) GetProcAddress(library, "gpr_log_verbosity_init");
gpr_set_log_function_import = (gpr_set_log_function_type) GetProcAddress(library, "gpr_set_log_function");
gpr_slice_ref_import = (gpr_slice_ref_type) GetProcAddress(library, "gpr_slice_ref");
gpr_slice_unref_import = (gpr_slice_unref_type) GetProcAddress(library, "gpr_slice_unref");
diff --git a/src/python/grpcio/grpc/_cython/imports.generated.h b/src/python/grpcio/grpc/_cython/imports.generated.h
index 272e85b485..bd032ac8d0 100644
--- a/src/python/grpcio/grpc/_cython/imports.generated.h
+++ b/src/python/grpcio/grpc/_cython/imports.generated.h
@@ -472,6 +472,12 @@ extern gpr_log_type gpr_log_import;
typedef void(*gpr_log_message_type)(const char *file, int line, gpr_log_severity severity, const char *message);
extern gpr_log_message_type gpr_log_message_import;
#define gpr_log_message gpr_log_message_import
+typedef void(*gpr_set_log_verbosity_type)(gpr_log_severity min_severity_to_print);
+extern gpr_set_log_verbosity_type gpr_set_log_verbosity_import;
+#define gpr_set_log_verbosity gpr_set_log_verbosity_import
+typedef void(*gpr_log_verbosity_init_type)();
+extern gpr_log_verbosity_init_type gpr_log_verbosity_init_import;
+#define gpr_log_verbosity_init gpr_log_verbosity_init_import
typedef void(*gpr_set_log_function_type)(gpr_log_func func);
extern gpr_set_log_function_type gpr_set_log_function_import;
#define gpr_set_log_function gpr_set_log_function_import
diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py
index 1f7f2a196b..94e1807c6b 100644
--- a/src/python/grpcio/grpc_core_dependencies.py
+++ b/src/python/grpcio/grpc_core_dependencies.py
@@ -210,6 +210,7 @@ CORE_SOURCE_FILES = [
'src/core/ext/client_config/lb_policy.c',
'src/core/ext/client_config/lb_policy_factory.c',
'src/core/ext/client_config/lb_policy_registry.c',
+ 'src/core/ext/client_config/parse_address.c',
'src/core/ext/client_config/resolver.c',
'src/core/ext/client_config/resolver_factory.c',
'src/core/ext/client_config/resolver_registry.c',
@@ -310,6 +311,7 @@ CORE_SOURCE_FILES = [
'third_party/boringssl/crypto/bn/shift.c',
'third_party/boringssl/crypto/bn/sqrt.c',
'third_party/boringssl/crypto/buf/buf.c',
+ 'third_party/boringssl/crypto/bytestring/asn1_compat.c',
'third_party/boringssl/crypto/bytestring/ber.c',
'third_party/boringssl/crypto/bytestring/cbb.c',
'third_party/boringssl/crypto/bytestring/cbs.c',
@@ -333,6 +335,7 @@ CORE_SOURCE_FILES = [
'third_party/boringssl/crypto/cpu-intel.c',
'third_party/boringssl/crypto/crypto.c',
'third_party/boringssl/crypto/curve25519/curve25519.c',
+ 'third_party/boringssl/crypto/curve25519/x25519-x86_64.c',
'third_party/boringssl/crypto/des/des.c',
'third_party/boringssl/crypto/dh/check.c',
'third_party/boringssl/crypto/dh/dh.c',
@@ -524,6 +527,7 @@ CORE_SOURCE_FILES = [
'third_party/boringssl/ssl/ssl_buffer.c',
'third_party/boringssl/ssl/ssl_cert.c',
'third_party/boringssl/ssl/ssl_cipher.c',
+ 'third_party/boringssl/ssl/ssl_ecdh.c',
'third_party/boringssl/ssl/ssl_file.c',
'third_party/boringssl/ssl/ssl_lib.c',
'third_party/boringssl/ssl/ssl_rsa.c',
diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c
index 56db4ec686..702e0244bb 100644
--- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c
+++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c
@@ -174,6 +174,8 @@ grpc_byte_buffer_reader_readall_type grpc_byte_buffer_reader_readall_import;
grpc_raw_byte_buffer_from_reader_type grpc_raw_byte_buffer_from_reader_import;
gpr_log_type gpr_log_import;
gpr_log_message_type gpr_log_message_import;
+gpr_set_log_verbosity_type gpr_set_log_verbosity_import;
+gpr_log_verbosity_init_type gpr_log_verbosity_init_import;
gpr_set_log_function_type gpr_set_log_function_import;
gpr_slice_ref_type gpr_slice_ref_import;
gpr_slice_unref_type gpr_slice_unref_import;
@@ -436,6 +438,8 @@ void grpc_rb_load_imports(HMODULE library) {
grpc_raw_byte_buffer_from_reader_import = (grpc_raw_byte_buffer_from_reader_type) GetProcAddress(library, "grpc_raw_byte_buffer_from_reader");
gpr_log_import = (gpr_log_type) GetProcAddress(library, "gpr_log");
gpr_log_message_import = (gpr_log_message_type) GetProcAddress(library, "gpr_log_message");
+ gpr_set_log_verbosity_import = (gpr_set_log_verbosity_type) GetProcAddress(library, "gpr_set_log_verbosity");
+ gpr_log_verbosity_init_import = (gpr_log_verbosity_init_type) GetProcAddress(library, "gpr_log_verbosity_init");
gpr_set_log_function_import = (gpr_set_log_function_type) GetProcAddress(library, "gpr_set_log_function");
gpr_slice_ref_import = (gpr_slice_ref_type) GetProcAddress(library, "gpr_slice_ref");
gpr_slice_unref_import = (gpr_slice_unref_type) GetProcAddress(library, "gpr_slice_unref");
diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h
index c526f434c6..52c0e43f91 100644
--- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h
+++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h
@@ -472,6 +472,12 @@ extern gpr_log_type gpr_log_import;
typedef void(*gpr_log_message_type)(const char *file, int line, gpr_log_severity severity, const char *message);
extern gpr_log_message_type gpr_log_message_import;
#define gpr_log_message gpr_log_message_import
+typedef void(*gpr_set_log_verbosity_type)(gpr_log_severity min_severity_to_print);
+extern gpr_set_log_verbosity_type gpr_set_log_verbosity_import;
+#define gpr_set_log_verbosity gpr_set_log_verbosity_import
+typedef void(*gpr_log_verbosity_init_type)();
+extern gpr_log_verbosity_init_type gpr_log_verbosity_init_import;
+#define gpr_log_verbosity_init gpr_log_verbosity_init_import
typedef void(*gpr_set_log_function_type)(gpr_log_func func);
extern gpr_set_log_function_type gpr_set_log_function_import;
#define gpr_set_log_function gpr_set_log_function_import
diff --git a/src/ruby/qps/server.rb b/src/ruby/qps/server.rb
index 26f46a3140..f05fbbdaaf 100644
--- a/src/ruby/qps/server.rb
+++ b/src/ruby/qps/server.rb
@@ -88,4 +88,7 @@ class BenchmarkServer
def get_port
@port
end
+ def stop
+ @server.stop
+ end
end
diff --git a/src/ruby/qps/src/proto/grpc/testing/control.rb b/src/ruby/qps/src/proto/grpc/testing/control.rb
index d007123f26..b81e22659d 100644
--- a/src/ruby/qps/src/proto/grpc/testing/control.rb
+++ b/src/ruby/qps/src/proto/grpc/testing/control.rb
@@ -9,26 +9,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "grpc.testing.PoissonParams" do
optional :offered_load, :double, 1
end
- add_message "grpc.testing.UniformParams" do
- optional :interarrival_lo, :double, 1
- optional :interarrival_hi, :double, 2
- end
- add_message "grpc.testing.DeterministicParams" do
- optional :offered_load, :double, 1
- end
- add_message "grpc.testing.ParetoParams" do
- optional :interarrival_base, :double, 1
- optional :alpha, :double, 2
- end
add_message "grpc.testing.ClosedLoopParams" do
end
add_message "grpc.testing.LoadParams" do
oneof :load do
optional :closed_loop, :message, 1, "grpc.testing.ClosedLoopParams"
optional :poisson, :message, 2, "grpc.testing.PoissonParams"
- optional :uniform, :message, 3, "grpc.testing.UniformParams"
- optional :determ, :message, 4, "grpc.testing.DeterministicParams"
- optional :pareto, :message, 5, "grpc.testing.ParetoParams"
end
end
add_message "grpc.testing.SecurityParams" do
@@ -88,6 +74,40 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
end
add_message "grpc.testing.Void" do
end
+ add_message "grpc.testing.Scenario" do
+ optional :name, :string, 1
+ optional :client_config, :message, 2, "grpc.testing.ClientConfig"
+ optional :num_clients, :int32, 3
+ optional :server_config, :message, 4, "grpc.testing.ServerConfig"
+ optional :num_servers, :int32, 5
+ optional :warmup_seconds, :int32, 6
+ optional :benchmark_seconds, :int32, 7
+ optional :spawn_local_worker_count, :int32, 8
+ end
+ add_message "grpc.testing.Scenarios" do
+ repeated :scenarios, :message, 1, "grpc.testing.Scenario"
+ end
+ add_message "grpc.testing.ScenarioResultSummary" do
+ optional :qps, :double, 1
+ optional :qps_per_server_core, :double, 2
+ optional :server_system_time, :double, 3
+ optional :server_user_time, :double, 4
+ optional :client_system_time, :double, 5
+ optional :client_user_time, :double, 6
+ optional :latency_50, :double, 7
+ optional :latency_90, :double, 8
+ optional :latency_95, :double, 9
+ optional :latency_99, :double, 10
+ optional :latency_999, :double, 11
+ end
+ add_message "grpc.testing.ScenarioResult" do
+ optional :scenario, :message, 1, "grpc.testing.Scenario"
+ optional :latencies, :message, 2, "grpc.testing.HistogramData"
+ repeated :client_stats, :message, 3, "grpc.testing.ClientStats"
+ repeated :server_stats, :message, 4, "grpc.testing.ServerStats"
+ repeated :server_cores, :int32, 5
+ optional :summary, :message, 6, "grpc.testing.ScenarioResultSummary"
+ end
add_enum "grpc.testing.ClientType" do
value :SYNC_CLIENT, 0
value :ASYNC_CLIENT, 1
@@ -106,9 +126,6 @@ end
module Grpc
module Testing
PoissonParams = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.PoissonParams").msgclass
- UniformParams = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.UniformParams").msgclass
- DeterministicParams = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.DeterministicParams").msgclass
- ParetoParams = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ParetoParams").msgclass
ClosedLoopParams = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ClosedLoopParams").msgclass
LoadParams = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.LoadParams").msgclass
SecurityParams = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.SecurityParams").msgclass
@@ -122,6 +139,10 @@ module Grpc
CoreRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.CoreRequest").msgclass
CoreResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.CoreResponse").msgclass
Void = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.Void").msgclass
+ Scenario = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.Scenario").msgclass
+ Scenarios = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.Scenarios").msgclass
+ ScenarioResultSummary = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ScenarioResultSummary").msgclass
+ ScenarioResult = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ScenarioResult").msgclass
ClientType = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ClientType").enummodule
ServerType = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ServerType").enummodule
RpcType = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.RpcType").enummodule
diff --git a/src/ruby/qps/src/proto/grpc/testing/messages.rb b/src/ruby/qps/src/proto/grpc/testing/messages.rb
index b9c32dbef5..2bdfe0eade 100644
--- a/src/ruby/qps/src/proto/grpc/testing/messages.rb
+++ b/src/ruby/qps/src/proto/grpc/testing/messages.rb
@@ -46,6 +46,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "grpc.testing.StreamingOutputCallResponse" do
optional :payload, :message, 1, "grpc.testing.Payload"
end
+ add_message "grpc.testing.ReconnectParams" do
+ optional :max_reconnect_backoff_ms, :int32, 1
+ end
add_message "grpc.testing.ReconnectInfo" do
optional :passed, :bool, 1
repeated :backoff_ms, :int32, 2
@@ -73,6 +76,7 @@ module Grpc
ResponseParameters = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ResponseParameters").msgclass
StreamingOutputCallRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.StreamingOutputCallRequest").msgclass
StreamingOutputCallResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.StreamingOutputCallResponse").msgclass
+ ReconnectParams = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ReconnectParams").msgclass
ReconnectInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ReconnectInfo").msgclass
PayloadType = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.PayloadType").enummodule
CompressionType = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.CompressionType").enummodule
diff --git a/src/ruby/qps/worker.rb b/src/ruby/qps/worker.rb
index 7c29204cc2..665fb86352 100755
--- a/src/ruby/qps/worker.rb
+++ b/src/ruby/qps/worker.rb
@@ -55,12 +55,12 @@ class WorkerServiceImpl < Grpc::Testing::WorkerService::Service
Thread.new {
bms = ''
gtss = Grpc::Testing::ServerStatus
- reqs.each do |req|
+ reqs.each do |req|
case req.argtype.to_s
when 'setup'
bms = BenchmarkServer.new(req.setup, @server_port)
q.push(gtss.new(stats: bms.mark(false), port: bms.get_port))
- when 'mark'
+ when 'mark'
q.push(gtss.new(stats: bms.mark(req.mark.reset), cores: cpu_cores))
end
end