GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
octave::profiler Class Reference

#include "profiler.h"

Collaboration diagram for octave::profiler:

Classes

class  enter
 
struct  stats
 
class  tree_node
 

Public Member Functions

 profiler (const profiler &)=delete
 
 profiler (void)
 
virtual ~profiler (void)
 
bool enabled (void) const
 
octave_value get_flat (void) const
 
octave_value get_hierarchical (void) const
 
profileroperator= (const profiler &)=delete
 
void reset (void)
 
void set_active (bool)
 

Private Types

typedef std::map< std::string, octave_idx_typefcn_index_map
 
typedef std::vector< statsflat_profile
 
typedef std::vector< std::string > function_set
 

Private Member Functions

void add_current_time (void)
 
void enter_function (const std::string &)
 
void exit_function (const std::string &)
 
double query_time (void) const
 

Private Attributes

tree_nodem_active_fcn
 
tree_nodem_call_tree
 
bool m_enabled
 
fcn_index_map m_fcn_index
 
function_set m_known_functions
 
double m_last_time
 

Detailed Description

Definition at line 41 of file profiler.h.

Member Typedef Documentation

◆ fcn_index_map

typedef std::map<std::string, octave_idx_type> octave::profiler::fcn_index_map
private

Definition at line 187 of file profiler.h.

◆ flat_profile

typedef std::vector<stats> octave::profiler::flat_profile
private

Definition at line 132 of file profiler.h.

◆ function_set

typedef std::vector<std::string> octave::profiler::function_set
private

Definition at line 186 of file profiler.h.

Constructor & Destructor Documentation

◆ profiler() [1/2]

octave::profiler::profiler ( void  )

Definition at line 176 of file profiler.cc.

◆ profiler() [2/2]

octave::profiler::profiler ( const profiler )
delete

◆ ~profiler()

octave::profiler::~profiler ( void  )
virtual

Definition at line 182 of file profiler.cc.

References m_call_tree.

Member Function Documentation

◆ add_current_time()

void octave::profiler::add_current_time ( void  )
private

◆ enabled()

bool octave::profiler::enabled ( void  ) const
inline

◆ enter_function()

void octave::profiler::enter_function ( const std::string &  fcn)
private

◆ exit_function()

void octave::profiler::exit_function ( const std::string &  fcn)
private

◆ get_flat()

octave_value octave::profiler::get_flat ( void  ) const

◆ get_hierarchical()

octave_value octave::profiler::get_hierarchical ( void  ) const

Definition at line 336 of file profiler.cc.

References octave::profiler::tree_node::get_hierarchical(), m, m_call_tree, and retval.

Referenced by F__profiler_data__().

◆ operator=()

profiler& octave::profiler::operator= ( const profiler )
delete

◆ query_time()

double octave::profiler::query_time ( void  ) const
private

Definition at line 362 of file profiler.cc.

References octave::sys::time::double_value().

Referenced by add_current_time(), enter_function(), and exit_function().

◆ reset()

void octave::profiler::reset ( void  )

Definition at line 255 of file profiler.cc.

References enabled(), error(), m_active_fcn, m_call_tree, m_fcn_index, m_known_functions, and m_last_time.

Referenced by F__profiler_reset__().

◆ set_active()

void octave::profiler::set_active ( bool  value)

Definition at line 188 of file profiler.cc.

References m_enabled.

Referenced by F__profiler_enable__().

Member Data Documentation

◆ m_active_fcn

tree_node* octave::profiler::m_active_fcn
private

Definition at line 195 of file profiler.h.

Referenced by add_current_time(), enter_function(), exit_function(), and reset().

◆ m_call_tree

tree_node* octave::profiler::m_call_tree
private

Definition at line 194 of file profiler.h.

Referenced by ~profiler(), enter_function(), exit_function(), get_flat(), get_hierarchical(), and reset().

◆ m_enabled

bool octave::profiler::m_enabled
private

Definition at line 192 of file profiler.h.

Referenced by set_active().

◆ m_fcn_index

fcn_index_map octave::profiler::m_fcn_index
private

Definition at line 190 of file profiler.h.

Referenced by enter_function(), exit_function(), and reset().

◆ m_known_functions

function_set octave::profiler::m_known_functions
private

Definition at line 189 of file profiler.h.

Referenced by enter_function(), get_flat(), and reset().

◆ m_last_time

double octave::profiler::m_last_time
private

Definition at line 198 of file profiler.h.

Referenced by add_current_time(), enter_function(), exit_function(), and reset().


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