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

Method min

src/sdam/monitor.ts:730–738  ·  view source on GitHub ↗

* When \< 2 samples have been collected, returns 0 * Otherwise computes the minimum value samples contained in the buffer

()

Source from the content-addressed store, hash-verified

728 * Otherwise computes the minimum value samples contained in the buffer
729 */
730 min(): number {
731 if (this.length < 2) return 0;
732 let min = this.rttSamples[0];
733 for (let i = 1; i < this.length; i++) {
734 if (this.rttSamples[i] < min) min = this.rttSamples[i];
735 }
736
737 return min;
738 }
739
740 /**
741 * Returns mean of samples contained in the buffer

Callers 15

cursor.test-d.tsFile · 0.45
monitor.test.tsFile · 0.45
withTransactionMethod · 0.45
readMethod · 0.45
csotMinFunction · 0.45
handleReadResultFunction · 0.45
doWriteFunction · 0.45
constructorMethod · 0.45
updateMethod · 0.45
latencyWindowReducerFunction · 0.45
minRoundTripTimeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected