Available on crate feature profiling only.
Expand description

Implementation details for the profile macro

Structs

  • A scope guard recording the elapsed time of the scope
  • Thread local storage of the Profilers storing all Scopes of the thread
  • Profiler storing all locally created scopes with their timings and the current stack of scopes
  • RandomState used to obtain Hashers to hash ScopeIds for parent/child identification
  • Type used to uniquely identify scopes across threads

Functions

  • Resets the profiling data of all thread local Profilers
  • Pretty print the collected profiling data of all thread local Profilers to the given writer
  • Returns the pretty printed output of the collected profiling data as a String