Merge pull request #2026 from alexmiller-apple/knobs-for-network-test

Make the networktest payload size a knob so that it can be changed.
This commit is contained in:
Vishesh Yadav 2019-09-10 00:11:42 -07:00 committed by GitHub
commit 8a54a57420
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View File

@ -19,6 +19,7 @@
*/
#include "fdbserver/NetworkTest.h"
#include "flow/Knobs.h"
#include "flow/actorcompiler.h" // This must be the last #include.
UID WLTOKEN_NETWORKTEST( -1, 2 );
@ -58,7 +59,7 @@ ACTOR Future<Void> networkTestServer() {
ACTOR Future<Void> testClient( std::vector<NetworkTestInterface> interfs, int* sent ) {
loop {
NetworkTestReply rep = wait( retryBrokenPromise(interfs[deterministicRandom()->randomInt(0, interfs.size())].test, NetworkTestRequest( LiteralStringRef("."), 600000 ) ) );
NetworkTestReply rep = wait( retryBrokenPromise(interfs[deterministicRandom()->randomInt(0, interfs.size())].test, NetworkTestRequest( LiteralStringRef("."), FLOW_KNOBS->NETWORK_TEST_REPLY_SIZE ) ) );
(*sent)++;
}
}

View File

@ -74,6 +74,8 @@ FlowKnobs::FlowKnobs(bool randomize, bool isSimulated) {
init( TLS_CERT_REFRESH_DELAY_SECONDS, 12*60*60 );
init( NETWORK_TEST_REPLY_SIZE, 600e3 );
//AsyncFileCached
init( PAGE_CACHE_4K, 2LL<<30 );
init( PAGE_CACHE_64K, 200LL<<20 );

View File

@ -92,6 +92,8 @@ public:
int TLS_CERT_REFRESH_DELAY_SECONDS;
int NETWORK_TEST_REPLY_SIZE;
//AsyncFileCached
int64_t PAGE_CACHE_4K;
int64_t PAGE_CACHE_64K;