Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(NODE-5825): add minRoundTripTime to ServerDescription and change roundTripTime to a moving average #4059

Merged
merged 23 commits into from
Apr 3, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
variable naming
  • Loading branch information
W-A-James committed Apr 1, 2024
commit 3d8bc4185128dae1509a5969c9c5df1c5716a152
4 changes: 2 additions & 2 deletions src/sdam/monitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export class Monitor extends TypedEventEmitter<MonitorEvents> {
return this.rttSamplesMS.min();
}

get latestRTT(): number {
get latestRtt(): number {
return this.rttSamplesMS.last ?? 0; // FIXME: Check if this is acceptable
}

Expand Down Expand Up @@ -507,7 +507,7 @@ export class RTTPinger {
this[kCancellationToken] = cancellationToken;
this.closed = false;
this.monitor = monitor;
this.latestRTT = monitor.latestRTT;
this.latestRTT = monitor.latestRtt;

const heartbeatFrequencyMS = options.heartbeatFrequencyMS;
this[kMonitorId] = setTimeout(() => measureRoundTripTime(this, options), heartbeatFrequencyMS);
Expand Down
Loading