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

Manager class for multiple function profilers. More...

#include <function_profiler.hpp>

Public Member Functions

 FunctionProfilerManager ()=default
 Default constructor.
void add (const std::string &name)
 Add a new profiler for the specified function.
void remove (const std::string &name)
 Remove a profiler.
void start (const std::string &name)
 Start timing a function.
void stop (const std::string &name)
 Stop timing a function.
synapse::FunctionProfile get (const std::string &name)
 Get the profile for a specific function.
std::vector< synapse::FunctionProfile > get_all ()
 Get profiles for all functions.
void print_profile (const std::string &name)
 Print a function's profile information.

Detailed Description

Manager class for multiple function profilers.

Provides centralized management of multiple function profilers.

Member Function Documentation

◆ add()

void synapse::FunctionProfilerManager::add ( const std::string & name)

Add a new profiler for the specified function.

Parameters
nameName of the function to profile

◆ get()

synapse::FunctionProfile synapse::FunctionProfilerManager::get ( const std::string & name)

Get the profile for a specific function.

Parameters
nameName of the function
Returns
FunctionProfile Protocol buffer containing timing statistics

◆ get_all()

std::vector< synapse::FunctionProfile > synapse::FunctionProfilerManager::get_all ( )

Get profiles for all functions.

Returns
Vector of function profiles

◆ print_profile()

void synapse::FunctionProfilerManager::print_profile ( const std::string & name)

Print a function's profile information.

Parameters
nameName of the function

◆ remove()

void synapse::FunctionProfilerManager::remove ( const std::string & name)

Remove a profiler.

Parameters
nameName of the function profiler to remove

◆ start()

void synapse::FunctionProfilerManager::start ( const std::string & name)

Start timing a function.

Parameters
nameName of the function to start timing

◆ stop()

void synapse::FunctionProfilerManager::stop ( const std::string & name)

Stop timing a function.

Parameters
nameName of the function to stop timing

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