Firmware for Arduino | PLEN Project Company Inc.
Utility::Profiler Class Reference

Tiny metrics class. More...

#include <Profiler.h>

Public Member Functions

 Profiler (const __FlashStringHelper *fsh_ptr)
 Constructor. More...
 
 ~Profiler ()
 Destructor. More...
 

Detailed Description

Tiny metrics class.

Refer to the usage below.

void anyFunction()
{
// When instantiating the class, it outputs a given message.
volatile Utility::Profiler p(F("anyFunction()"));
Any code here...
// Outputting metrics about this function when profiler instance has destroyed.
}

Constructor & Destructor Documentation

Utility::Profiler::Profiler ( const __FlashStringHelper *  fsh_ptr)

Constructor.

Parameters
[in]fsh_ptrPlease set startup message.
Attention
Arduino IDE is using optimization option -Os, so you should use volatile prefix when instantiate the class.
Utility::Profiler::~Profiler ( )

Destructor.


The documentation for this class was generated from the following file: