synapse-app-sdk
C++ SDK for Synapse Apps
Loading...
Searching...
No Matches
synapse::FunctionProfiler Class Reference

Class for profiling function execution performance. More...

#include <function_profiler.hpp>

Public Member Functions

 FunctionProfiler (const std::string &name)
 Constructor for FunctionProfiler.
void start ()
 Start timing a function call.
void stop ()
 Stop timing and record the duration.
synapse::FunctionProfile get_profile ()
 Get the current profile statistics.

Detailed Description

Class for profiling function execution performance.

Tracks execution time statistics for a specific function or code section.

Constructor & Destructor Documentation

◆ FunctionProfiler()

synapse::FunctionProfiler::FunctionProfiler ( const std::string & name)
explicit

Constructor for FunctionProfiler.

Parameters
nameName of the function or code section being profiled

Member Function Documentation

◆ get_profile()

synapse::FunctionProfile synapse::FunctionProfiler::get_profile ( )

Get the current profile statistics.

Returns
FunctionProfile Protocol buffer containing timing statistics

The documentation for this class was generated from the following files:
  • include/synapse-app-sdk/utils/performance/function_profiler.hpp
  • src/utils/performance/function_profiler.cpp