mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 18:22:50 +01:00
ircd:Ⓜ️:sync: Add missing stats for the linear handler base.
This commit is contained in:
parent
a013c44f9e
commit
058f20fe30
1 changed files with 34 additions and 1 deletions
|
@ -360,7 +360,40 @@ try
|
|||
if(!enable)
|
||||
return false;
|
||||
|
||||
return _linear(data);
|
||||
#ifdef RB_DEBUG
|
||||
sync::stats stats
|
||||
{
|
||||
data.stats && (stats::info || stats_debug)?
|
||||
*data.stats:
|
||||
sync::stats{}
|
||||
};
|
||||
|
||||
if(data.stats && (stats::info || stats_debug))
|
||||
stats.timer = {};
|
||||
#endif
|
||||
|
||||
const bool ret
|
||||
{
|
||||
_linear(data)
|
||||
};
|
||||
|
||||
#ifdef RB_DEBUG
|
||||
if(data.stats && (stats::info || stats_debug))
|
||||
{
|
||||
//data.out.flush();
|
||||
char tmbuf[32];
|
||||
log::debug
|
||||
{
|
||||
log, "linear %s commit:%b '%s' %s",
|
||||
loghead(data),
|
||||
ret,
|
||||
name(),
|
||||
ircd::pretty(tmbuf, stats.timer.at<microseconds>(), true)
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
catch(const ctx::interrupted &)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue