diff options
Diffstat (limited to 'modules/core/module-servermon.js')
| -rw-r--r-- | modules/core/module-servermon.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/core/module-servermon.js b/modules/core/module-servermon.js index b4f6057..600618a 100644 --- a/modules/core/module-servermon.js +++ b/modules/core/module-servermon.js @@ -70,9 +70,10 @@ class ServerMonitorModule { if (this._latencyLog.length > this._maxLatencyEntries) { this._latencyLog = this._latencyLog.slice(-this._maxLatencyEntries); } - // Persist every 20 calls - if (this._latencyLog.length % 20 === 0) { + // v4.5.66: Throttled persistence — every 100 calls or 5 minutes (was every 20) + if (this._latencyLog.length % 100 === 0 || (Date.now() - (this._lastPersistTs || 0)) > 300000) { this._persistLatency(); + this._lastPersistTs = Date.now(); } } _persistLatency() { |