Skip to content

Commit

Permalink
fix debug data
Browse files Browse the repository at this point in the history
  • Loading branch information
akvlad committed Aug 26, 2024
1 parent cf68412 commit 28cf4c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyroscope/pyroscope.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ const selectMergeProfile = async (req, res) => {
[new Sql.Raw('count()'), 'count']
)
.from([new Sql.Raw('(' + mainReq.toString() + ')'), 'main'])
console.log('!!!!!' + approxReq.toString() + ' FORMAT JSON')
const approx = await clickhouse.rawRequest(
approxReq.toString() + ' FORMAT JSON', null, DATABASE_NAME()
)
Expand All @@ -197,14 +196,15 @@ const selectMergeProfile = async (req, res) => {

for (let i = 0; i < chunksCount; i++) {
promises.push((async (i) => {
logger.debug(`Chunk ${i}: ${mainReq.toString() + ` LIMIT ${chunkSize} OFFSET ${i * chunkSize} FORMAT RowBinary`}`)
logger.debug(`Processing chunk ${i}`)
const profiles = await clickhouse.rawRequest(mainReq.toString() + ` LIMIT ${chunkSize} OFFSET ${i * chunkSize} FORMAT RowBinary`,
null,
DATABASE_NAME(),
{
responseType: 'arraybuffer'
})
const binData = Uint8Array.from(profiles.data)
logger.debug(`Chunk ${i} - ${binData.length} bytes`)
const start = process.hrtime.bigint()
pprofBin.merge_trees_pprof(ctx, binData)
const end = process.hrtime.bigint()
Expand Down

0 comments on commit 28cf4c1

Please sign in to comment.