Merge pull request #6979 from sfc-gh-jslocum/speedup_tail_latency

Don't do huge tail latencies for network requests when speed up simul…
This commit is contained in:
Steve Atherton 2022-04-29 22:31:35 -07:00 committed by GitHub
commit 1ab5c21967
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -171,7 +171,7 @@ private:
double halfLatency() const { double halfLatency() const {
double a = deterministicRandom()->random01(); double a = deterministicRandom()->random01();
const double pFast = 0.999; const double pFast = 0.999;
if (a <= pFast) { if (a <= pFast || g_simulator.speedUpSimulation) {
a = a / pFast; a = a / pFast;
return 0.5 * (FLOW_KNOBS->MIN_NETWORK_LATENCY * (1 - a) + return 0.5 * (FLOW_KNOBS->MIN_NETWORK_LATENCY * (1 - a) +
FLOW_KNOBS->FAST_NETWORK_LATENCY / pFast * a); // 0.5ms average FLOW_KNOBS->FAST_NETWORK_LATENCY / pFast * a); // 0.5ms average