From b6a4c3ff670ab1bee6b81d67a0bbb03068cb1977 Mon Sep 17 00:00:00 2001 From: akvlad Date: Mon, 26 Aug 2024 15:46:49 +0300 Subject: [PATCH] chunking on pprof merge request --- pyroscope/pyroscope.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyroscope/pyroscope.js b/pyroscope/pyroscope.js index c635b99b..58945cb9 100644 --- a/pyroscope/pyroscope.js +++ b/pyroscope/pyroscope.js @@ -185,7 +185,7 @@ const selectMergeProfile = async (req, res) => { ) const approxData = approx.data.data[0] logger.debug(`Approximate size: ${approxData.size} bytes, profiles count: ${approxData.count}`) - const chunksCount = Math.max(Math.ceil(approxData.size / (50 * 1024)), 1) + const chunksCount = Math.max(Math.ceil(approxData.size / (50 * 1024 * 1024)), 1) logger.debug(`Request is processed in: ${chunksCount} chunks`) const chunkSize = Math.ceil(approxData.count / chunksCount) const promises = []