Closed thomaseizinger closed 2 months ago
During profiling of my application, I noticed that ~1% of a fairly hot function was spent in alloc::fmt::format::format:
alloc::fmt::format::format
The particular function is implemented here: https://github.com/firezone/firezone/blob/947db254cc968ca0f4112d0aa54f78b3131700c6/rust/connlib/tunnel/src/io.rs#L138-L158
At the time of benchmarking, only the INFO level was active.
INFO
Is it possible that tracing invokes the formatter of fields despite their level not being active?
tracing
False alarm, turned out to be something else.
During profiling of my application, I noticed that ~1% of a fairly hot function was spent in
alloc::fmt::format::format
:The particular function is implemented here: https://github.com/firezone/firezone/blob/947db254cc968ca0f4112d0aa54f78b3131700c6/rust/connlib/tunnel/src/io.rs#L138-L158
At the time of benchmarking, only the
INFO
level was active.Is it possible that
tracing
invokes the formatter of fields despite their level not being active?