[feature] add Generic debug timer for debugging or profiling (#7923)

add a group of debug-timer for the purpose of profiling or testing
you can use these timers for custom meaning purpose unlike the specific named timer
This commit is contained in:
zuochunwei
2022-01-31 22:15:43 +08:00
committed by GitHub
parent a6962af30f
commit 4e783afa7a
9 changed files with 38 additions and 7 deletions

View File

@ -159,6 +159,13 @@ void OlapScanNode::_init_counter(RuntimeState* state) {
// time of node to wait for batch/block queue
_olap_wait_batch_queue_timer = ADD_TIMER(_runtime_profile, "BatchQueueWaitTime");
// for the purpose of debugging or profiling
for (int i = 0; i < sizeof(_general_debug_timer)/sizeof(*_general_debug_timer); ++i) {
char name[64];
snprintf(name, sizeof(name), "GeneralDebugTimer%d", i);
_general_debug_timer[i] = ADD_TIMER(_segment_profile, name);
}
}
Status OlapScanNode::prepare(RuntimeState* state) {