Resets all profiling data of this profiler
(&mut self)
| 127 | impl Profiler { |
| 128 | /// Resets all profiling data of this profiler |
| 129 | pub fn reset(&mut self) { |
| 130 | self.scopes.clear(); |
| 131 | self.scope_stack.clear(); |
| 132 | self.roots.clear(); |
| 133 | } |
| 134 | |
| 135 | /// Enter a scope with the given name and push it onto the stack of scopes. It will be a child scope of the current top of the stack. |
| 136 | pub fn enter(&mut self, name: &'static str) -> (Guard, ScopeId) { |