mirror of
https://github.com/matrix-construct/construct
synced 2024-11-18 07:50:57 +01:00
irct::ctx: Add this basic pool debug.
This commit is contained in:
parent
0fe97a2ed5
commit
c157967559
2 changed files with 15 additions and 0 deletions
|
@ -72,6 +72,8 @@ struct ircd::ctx::pool
|
||||||
pool &operator=(pool &&) = delete;
|
pool &operator=(pool &&) = delete;
|
||||||
pool &operator=(const pool &) = delete;
|
pool &operator=(const pool &) = delete;
|
||||||
~pool() noexcept;
|
~pool() noexcept;
|
||||||
|
|
||||||
|
friend void debug_stats(const pool &);
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class F,
|
template<class F,
|
||||||
|
|
13
ircd/ctx.cc
13
ircd/ctx.cc
|
@ -733,6 +733,19 @@ catch(const std::exception &e)
|
||||||
e.what());
|
e.what());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ircd::ctx::debug_stats(const pool &pool)
|
||||||
|
{
|
||||||
|
log::debug("pool '%s' (stack size: %zu) total: %zu avail: %zu queued: %zu active: %zu pending: %zu",
|
||||||
|
pool.name,
|
||||||
|
pool.stack_size,
|
||||||
|
pool.size(),
|
||||||
|
pool.avail(),
|
||||||
|
pool.queued(),
|
||||||
|
pool.active(),
|
||||||
|
pool.pending());
|
||||||
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// ctx_prof.h
|
// ctx_prof.h
|
||||||
|
|
Loading…
Reference in a new issue