MCPcopy Create free account
hub / github.com/PrairieLearn/PrairieLearn / _addIntegratedLoad

Method _addIntegratedLoad

lib/load.js:69–76  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

67 }
68
69 _addIntegratedLoad() {
70 debug(`LoadEstimator._addIntegratedLoad(): jobType = ${this.jobType}`);
71 const currentJobCount = _.size(this.currentJobs);
72 const nowMS = Date.now();
73 const delta = Math.max(1, nowMS - this.lastIncrementTimeMS) / 1000;
74 this.integratedLoad += delta * currentJobCount;
75 this.lastIncrementTimeMS = nowMS;
76 }
77
78 _reportLoad() {
79 debug(`LoadEstimator._reportLoad(): jobType = ${this.jobType}`);

Callers 3

startJobMethod · 0.95
endJobMethod · 0.95

Calls 1

debugFunction · 0.85

Tested by

no test coverage detected