Only log if it took longer than 100 ms

This commit is contained in:
Alexander Gololobov 2024-04-18 14:39:23 +01:00 committed by GitHub
parent 01b80e754a
commit 25cfd48f87
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1246,8 +1246,10 @@ void TCPHandler::sendProfileEvents()
state.profile_events_block_out->write(block);
out->next();
LOG_TRACE(log, "Sending profile events block with {} rows, {} bytes took {} milliseconds",
block.rows(), block.bytes(), stopwatch.elapsedMilliseconds());
auto elapsed_milliseconds = stopwatch.elapsedMilliseconds();
if (elapsed_milliseconds > 100)
LOG_DEBUG(log, "Sending profile events block with {} rows, {} bytes took {} milliseconds",
block.rows(), block.bytes(), elapsed_milliseconds);
}
}