Resets the profiling data of all thread local [`Profiler`]s Note that it should be ensure that this is called outside of any scopes. It's safe to also call this function from inside a scope but it can lead to inconsistent profiling data (if a new scope is created afterwards followed by dropping of an old scope).
()
| 305 | /// this function from inside a scope but it can lead to inconsistent profiling data (if a new scope |
| 306 | /// is created afterwards followed by dropping of an old scope). |
| 307 | pub fn reset() { |
| 308 | for profiler in PROFILER.iter() { |
| 309 | profiler.write().reset(); |
| 310 | } |
| 311 | } |