Profiler Tab

The profiler tab will display all scopes that have been added to the profiler API. With the tab, you can record for a few moments all scopes and then afterward analyze them.

You can use the profiler API defined in the foundation/profiler.h. in your own projects. After you have loaded the [tm_profiler_api](https://ourmachinery.com/apidoc/foundation/profiler.h.html#structtm_profiler_api) in your plugin load function.

Profiler Macros
TM_PROFILER_BEGIN_FUNC_SCOPE() / TM_PROFILER_END_FUNC_SCOPE()
Starts a profiling scope for the current function. The scope in the profiler will have this name.
TM_PROFILER_BEGIN_LOCAL_SCOPE(tag) / TM_PROFILER_END_LOCAL_SCOPE(tag)
The call to this macro starts a local profiler scope. The scope is tagged with the naked word tag (it gets stringified by the macro). Use a local profiler scope if you need to profile parts of a function.

Example:

void my_function(https://ourmachinery.github.io/themachinery-books/the_machinery_book/*some arguments*/){
   TM_PROFILER_BEGIN_FUNC_SCOPE()
   // .. some code
   TM_PROFILER_END_FUNC_SCOPE()
}