added a knob for the number of samples

This commit is contained in:
Evan Tschannen 2020-10-06 17:38:09 -07:00
parent d59ee9cc30
commit 29d4d87b56
3 changed files with 3 additions and 1 deletions

View File

@ -132,7 +132,7 @@ struct Peer : public ReferenceCounted<Peer> {
: transport(transport), destination(destination), outgoingConnectionIdle(true), lastConnectTime(0.0),
reconnectionDelay(FLOW_KNOBS->INITIAL_RECONNECTION_TIME), compatible(true), outstandingReplies(0),
incompatibleProtocolVersionNewer(false), peerReferences(-1), bytesReceived(0), lastDataPacketSentTime(now()),
pingLatencies(destination.isPublic() ? 100 : 1), lastLoggedBytesReceived(0) {}
pingLatencies(destination.isPublic() ? FLOW_KNOBS->PING_SAMPLE_AMOUNT : 1), lastLoggedBytesReceived(0) {}
void send(PacketBuffer* pb, ReliablePacket* rp, bool firstUnsent);

View File

@ -73,6 +73,7 @@ FlowKnobs::FlowKnobs(bool randomize, bool isSimulated) {
init( TOO_MANY_CONNECTIONS_CLOSED_RESET_DELAY, 5.0 );
init( TOO_MANY_CONNECTIONS_CLOSED_TIMEOUT, 20.0 );
init( PING_LOGGING_INTERVAL, 1.0 );
init( PING_SAMPLE_AMOUNT, 100 );
init( TLS_CERT_REFRESH_DELAY_SECONDS, 12*60*60 );
init( TLS_SERVER_CONNECTION_THROTTLE_TIMEOUT, 9.0 );

View File

@ -91,6 +91,7 @@ public:
int ACCEPT_BATCH_SIZE;
int USE_OBJECT_SERIALIZER;
double PING_LOGGING_INTERVAL;
int PING_SAMPLE_AMOUNT;
int TLS_CERT_REFRESH_DELAY_SECONDS;
double TLS_SERVER_CONNECTION_THROTTLE_TIMEOUT;