MCPcopy
hub / github.com/mongodb/node-mongodb-native / constructor

Method constructor

src/sdam/monitor.ts:490–499  ·  view source on GitHub ↗
(monitor: Monitor)

Source from the content-addressed store, hash-verified

488 latestRtt?: number;
489
490 constructor(monitor: Monitor) {
491 this.connection = undefined;
492 this.cancellationToken = monitor.cancellationToken;
493 this.closed = false;
494 this.monitor = monitor;
495 this.latestRtt = monitor.latestRtt ?? undefined;
496
497 const heartbeatFrequencyMS = monitor.options.heartbeatFrequencyMS;
498 this.monitorId = setTimeout(() => this.measureRoundTripTime(), heartbeatFrequencyMS);
499 }
500
501 get roundTripTime(): number {
502 return this.monitor.roundTripTime;

Callers

nothing calls this directly

Calls 1

measureRoundTripTimeMethod · 0.95

Tested by

no test coverage detected