-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
Since your lib requires modifications to the source code, it's not easy to disable it for a true release. I see two ways to fix this:
- Add a compile time feature which prevents data collection. I'm thinking global const with a compile time value, and a
if !STATIC_ENABLED { return }in every function. Since the condition is known at compile time, it should be inlined and removed by rustc. - Add a runtime switch, like
flame::disable()for example. It could set anAtomicBool. It would be a bit slower but would allow the activation without recompiling. Now that I thing of it, it would be a very nice feature to have!
These two options could be implemented at the same time, like if !STATIC_ENABLED || !DYNAMIC_ENABLED ....
Metadata
Metadata
Assignees
Labels
No labels