From f3a86ed54444ee59d2229784222ba641a16e18ee Mon Sep 17 00:00:00 2001 From: HF Date: Wed, 7 Sep 2022 13:39:11 +0200 Subject: [PATCH] increase threshold for long-respones-time warning --- src/core/draw.js | 2 +- src/routes/chunks.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/draw.js b/src/core/draw.js index f59da99..790e2ea 100644 --- a/src/core/draw.js +++ b/src/core/draw.js @@ -206,7 +206,7 @@ export async function drawByOffsets( } const duration = Date.now() - startTime; - if (duration > 1000) { + if (duration > 2000) { logger.warn( // eslint-disable-next-line max-len `Long response time of ${duration}ms for placing ${pxlCnt} pixels for user ${user.id || user.ip}`, diff --git a/src/routes/chunks.js b/src/routes/chunks.js index a667aa6..10623ac 100644 --- a/src/routes/chunks.js +++ b/src/routes/chunks.js @@ -55,7 +55,7 @@ export default async (req, res, next) => { const stime = Date.now(); chunk = await RedisCanvas.getChunk(c, x, y); const dur = Date.now() - stime; - if (dur > 1000) { + if (dur > 2000) { // eslint-disable-next-line max-len logger.warn(`Long redis response times of ${dur}ms for chunk ${c}:${x},${y}`); }