From cb7e2cb1e06af504f3d1f1ca7f479a97d95168db Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Sat, 8 Feb 2025 23:47:29 +0800 Subject: [PATCH] refactor(stream): record the elapsed time for close stream tasks. --- source/dnode/mgmt/mgmt_vnode/src/vmInt.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/dnode/mgmt/mgmt_vnode/src/vmInt.c b/source/dnode/mgmt/mgmt_vnode/src/vmInt.c index 47533a102a..00fa2a8c95 100644 --- a/source/dnode/mgmt/mgmt_vnode/src/vmInt.c +++ b/source/dnode/mgmt/mgmt_vnode/src/vmInt.c @@ -711,7 +711,8 @@ static void vmCloseVnodes(SVnodeMgmt *pMgmt) { pMgmt->state.openVnodes = 0; dInfo("close %d vnodes with %d threads", numOfVnodes, threadNum); - dInfo("notify all streams closed in all %d vnodes", numOfVnodes); + int64_t st = taosGetTimestampMs(); + dInfo("notify all streams closed in all %d vnodes, ts:%" PRId64, numOfVnodes, st); if (ppVnodes != NULL) { for (int32_t i = 0; i < numOfVnodes; ++i) { if (ppVnodes[i] != NULL) { @@ -721,7 +722,9 @@ static void vmCloseVnodes(SVnodeMgmt *pMgmt) { } } } - dInfo("notify close stream completed in %d vnodes", numOfVnodes); + + int64_t et = taosGetTimestampMs(); + dInfo("notify close stream completed in %d vnodes, elapsed time: %" PRId64 "ms", numOfVnodes, et - st); for (int32_t t = 0; t < threadNum; ++t) { SVnodeThread *pThread = &threads[t];