mirror of
https://github.com/matrix-construct/construct
synced 2024-12-27 16:04:15 +01:00
construct: Add constexpr conditional debuglog on main event loop w/ epoch count.
This commit is contained in:
parent
af102fcab6
commit
771bb45537
1 changed files with 12 additions and 9 deletions
|
@ -346,17 +346,20 @@ noexcept try
|
||||||
// 1
|
// 1
|
||||||
// Execution.
|
// Execution.
|
||||||
// Blocks until a clean exit from a quit() or an exception comes out of it.
|
// Blocks until a clean exit from a quit() or an exception comes out of it.
|
||||||
const size_t handled
|
size_t epoch{0};
|
||||||
|
for(; !ios.stopped(); ++epoch)
|
||||||
{
|
{
|
||||||
ios.run()
|
ios.run_one();
|
||||||
};
|
|
||||||
|
|
||||||
ircd::log::debug
|
if constexpr(ircd::ios::profile_logging)
|
||||||
|
ircd::log::logf
|
||||||
{
|
{
|
||||||
"epoch construct:%zu ircd:%zu",
|
ircd::ios::log, ircd::log::DEBUG,
|
||||||
handled,
|
"EPOCH ----- construct:%zu ircd:%zu %zu",
|
||||||
|
epoch,
|
||||||
ircd::ios::epoch(),
|
ircd::ios::epoch(),
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// 13
|
// 13
|
||||||
// The smoketest is enabled if the first value is true; then all of the
|
// The smoketest is enabled if the first value is true; then all of the
|
||||||
|
|
Loading…
Reference in a new issue