A class that can be used to wrap a function object and connect it to a function profiler. More...
#include <kanzi/core/profiling/function_profiler_source.hpp>
Public Member Functions | |
FunctionWrapper (Profiler &profiler, string_view name, string_view category, size_t measurementBufferSize, function< void()> function) | |
Constructor. More... | |
void | operator() () |
Override operator () to act as a functor. More... | |
Public Member Functions inherited from kanzi::FunctionProfilerInstance | |
FunctionProfilerInstance (Profiler &profiler, string_view name, string_view category, size_t sampleBufferSize) | |
Constructor. More... | |
FunctionProfilerSource & | get () |
Provides access to the function profiling source that is managed by this object. More... | |
A class that can be used to wrap a function object and connect it to a function profiler.
The wrapper object is a functor and can be used in place of the function object.
kanzi::FunctionWrapper::FunctionWrapper | ( | Profiler & | profiler, |
string_view | name, | ||
string_view | category, | ||
size_t | measurementBufferSize, | ||
function< void()> | function | ||
) |
Constructor.
profiler | The profiler instance this function profiler is connected in to. |
name | Name of the function. |
category | Category of the function that is being profiled. |
sampleBufferSize | Size of the sample ring buffer that is used to store more detailed per-invocation data. |
function | The function to wrap. |
|
inline |
Override operator () to act as a functor.