mirror of https://github.com/calzoneman/sync.git
Reset prometheus summaries for more accurate percentiles per 5 minutes
This commit is contained in:
parent
014f3f008e
commit
a2be65aead
|
@ -19,6 +19,10 @@ const queryCount = new Counter({
|
|||
help: 'DB query count'
|
||||
});
|
||||
|
||||
setInterval(() => {
|
||||
queryLatency.reset();
|
||||
}, 5 * 60 * 1000).unref();
|
||||
|
||||
let db = null;
|
||||
let globalBanDB = null;
|
||||
|
||||
|
|
|
@ -58,6 +58,10 @@ function initPrometheus(app) {
|
|||
});
|
||||
next();
|
||||
});
|
||||
|
||||
setInterval(() => {
|
||||
latency.reset();
|
||||
}, 5 * 60 * 1000).unref();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue