mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 11:05:54 +00:00
Report slow stop times only in release builds
This commit is contained in:
@@ -114,8 +114,13 @@ void Stoppable::stopAsyncRecursive (Journal j)
|
|||||||
onStop ();
|
onStop ();
|
||||||
auto const ms = duration_cast<milliseconds>(
|
auto const ms = duration_cast<milliseconds>(
|
||||||
high_resolution_clock::now() - start).count();
|
high_resolution_clock::now() - start).count();
|
||||||
|
|
||||||
|
#ifdef NDEBUG
|
||||||
if (ms >= 10)
|
if (ms >= 10)
|
||||||
j.fatal << m_name << "::onStop took " << ms << "ms";
|
j.fatal << m_name << "::onStop took " << ms << "ms";
|
||||||
|
#else
|
||||||
|
(void)ms;
|
||||||
|
#endif
|
||||||
|
|
||||||
for (Children::const_iterator iter (m_children.cbegin ());
|
for (Children::const_iterator iter (m_children.cbegin ());
|
||||||
iter != m_children.cend(); ++iter)
|
iter != m_children.cend(); ++iter)
|
||||||
|
|||||||
Reference in New Issue
Block a user