From 2b930eb4b219852e1c2a44bd368552c71b9ec1f6 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sat, 11 Jul 2020 17:41:00 -0700 Subject: [PATCH] ircd::json: Disable profiling counters by default. --- ircd/json.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ircd/json.cc b/ircd/json.cc index a22aa7cf8..460fe8187 100644 --- a/ircd/json.cc +++ b/ircd/json.cc @@ -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(g), std::forward(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(start, stop, std::forward(g), std::forward(a)...); }