Description
I sometimes get .puffin
files from users and wished it contained more information. One of the major questions I often have is "was this recorded on a debug build?".
A great solution for this would be to add support for logging text in puffin. puffin
could by default log cfg!(debug_assertions)
and rust compiler version, for instance, and puffin users could log their application version, build flags, etc.
The viewer should show these log messages in its own window.
Implementation-wise, I think it makes sense to log these as events, which like scopes contains file:line and function name and a start_time, but no end-time, because it is an instantaneous thing.
In the future we could also support showing such events in the flamegraph, so that one can log custom strings that give more context for a function call for instance, similar to the current "dynamic data".
Example
puffin::log!("Debug build: {}", cfg!(debug_assertions));