Profiler module

Butano profiling system.

It allows to measure elapsed time between code blocks defined by the user.

It can be enabled or disabled by overloading the definition of BN_CFG_PROFILER_ENABLED.

Files

file bn_config_profiler.h
file bn_profiler.h

Namespaces

namespace bn
Main Butano namespace.
namespace bn::profiler
Profiler related functions.

Defines

#define BN_CFG_PROFILER_ENABLED
#define BN_CFG_PROFILER_LOG_ENGINE
#define BN_CFG_PROFILER_LOG_ENGINE_DETAILED
#define BN_CFG_PROFILER_MAX_ENTRIES
#define BN_PROFILER_START(id)
#define BN_PROFILER_STOP()
#define BN_PROFILER_RESET()

Define documentation

#define BN_CFG_PROFILER_ENABLED

Specifies if the profiler is enabled or not.

#define BN_CFG_PROFILER_LOG_ENGINE

Specifies if Butano subsystems must be profiled or not.

#define BN_CFG_PROFILER_LOG_ENGINE_DETAILED

Specifies if each Butano subsystem must be profiled separately or not.

BN_CFG_PROFILER_LOG_ENGINE must be true to enable Butano subsystems profiling.

#define BN_CFG_PROFILER_MAX_ENTRIES

Specifies the maximum number of code blocks that can be profiled without too many performance issues.

#define BN_PROFILER_START(id)

Parameters
id Small text string which identifies the code block.

Defines the start of a code block in which elapsed time is going to be measured.

#define BN_PROFILER_STOP()

Defines the end of a code block in which elapsed time is going to be measured.

#define BN_PROFILER_RESET()

Forgets all elapsed time measures.