mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +01:00
ircd::json: Disable profiling counters by default.
This commit is contained in:
parent
5ef1a67c99
commit
2b930eb4b2
1 changed files with 6 additions and 0 deletions
|
@ -355,8 +355,11 @@ ircd::json::printer::operator()(mutable_buffer &out,
|
||||||
attr&&... a)
|
attr&&... a)
|
||||||
const
|
const
|
||||||
{
|
{
|
||||||
|
#ifdef IRCD_JSON_PRINTER_STATS
|
||||||
++stats.print_calls;
|
++stats.print_calls;
|
||||||
const prof::scope_cycles timer{stats.print_cycles};
|
const prof::scope_cycles timer{stats.print_cycles};
|
||||||
|
#endif
|
||||||
|
|
||||||
if(unlikely(!ircd::generate(out, std::forward<gen>(g), std::forward<attr>(a)...)))
|
if(unlikely(!ircd::generate(out, std::forward<gen>(g), std::forward<attr>(a)...)))
|
||||||
throw print_error
|
throw print_error
|
||||||
{
|
{
|
||||||
|
@ -452,8 +455,11 @@ ircd::json::parser::operator()(const char *&start,
|
||||||
attr&&...a)
|
attr&&...a)
|
||||||
const
|
const
|
||||||
{
|
{
|
||||||
|
#ifdef IRCD_JSON_PARSER_STATS
|
||||||
++stats.parse_calls;
|
++stats.parse_calls;
|
||||||
const prof::scope_cycles timer{stats.parse_cycles};
|
const prof::scope_cycles timer{stats.parse_cycles};
|
||||||
|
#endif
|
||||||
|
|
||||||
return ircd::parse<parse_error>(start, stop, std::forward<gen>(g), std::forward<attr>(a)...);
|
return ircd::parse<parse_error>(start, stop, std::forward<gen>(g), std::forward<attr>(a)...);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue