0
0
Fork 0
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:
Jason Volk 2020-12-03 04:45:35 -08:00
parent a013c44f9e
commit 058f20fe30

View file

@ -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 &)
{