BiteTheDDDDt opened a new issue #6458: URL: https://github.com/apache/incubator-doris/issues/6458
**Describe the bug** `SCOPED_RAW_TIMER` can be used to calculate the time usage in the life cycle. It will only update the time when it is destruct. I found it was used incorrectly in some places. ```cpp std::vector<scoped_refptr<Thread>> threads(1000); { int64_t thread_creation_ns = 0; SCOPED_RAW_TIMER(&thread_creation_ns); for (auto& t : threads) { Status status = Thread::create("test", "TestCallOnExit", SleepFor, MonoDelta::FromSeconds(0), &t); ASSERT_TRUE(status.ok()); } std::cout << "create 1000 threads use:" << thread_creation_ns << "ns" << std::endl; } ``` Like here, the output result will always be 0. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org