0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-02 18:18:56 +02:00

ircd::json: Disable profiling counters by default.

This commit is contained in:
Jason Volk 2020-07-11 17:41:00 -07:00
parent 5ef1a67c99
commit 2b930eb4b2

View file

@ -355,8 +355,11 @@ ircd::json::printer::operator()(mutable_buffer &out,
attr&&... a)
const
{
#ifdef IRCD_JSON_PRINTER_STATS
++stats.print_calls;
const prof::scope_cycles timer{stats.print_cycles};
#endif
if(unlikely(!ircd::generate(out, std::forward<gen>(g), std::forward<attr>(a)...)))
throw print_error
{
@ -452,8 +455,11 @@ ircd::json::parser::operator()(const char *&start,
attr&&...a)
const
{
#ifdef IRCD_JSON_PARSER_STATS
++stats.parse_calls;
const prof::scope_cycles timer{stats.parse_cycles};
#endif
return ircd::parse<parse_error>(start, stop, std::forward<gen>(g), std::forward<attr>(a)...);
}