GNU Octave  4.4.1
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 (void)
 
 profiler (const profiler &)=delete
 
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::stringfunction_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 39 of file profiler.h.

Member Typedef Documentation

◆ fcn_index_map

Definition at line 185 of file profiler.h.

◆ flat_profile

Definition at line 130 of file profiler.h.

◆ function_set

Definition at line 184 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()

◆ 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_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(), and now.

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, and value.

Referenced by F__profiler_enable__().

Member Data Documentation

◆ m_active_fcn

tree_node* octave::profiler::m_active_fcn
private

Definition at line 193 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 192 of file profiler.h.

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

◆ m_enabled

bool octave::profiler::m_enabled
private

Definition at line 190 of file profiler.h.

Referenced by set_active().

◆ m_fcn_index

fcn_index_map octave::profiler::m_fcn_index
private

Definition at line 188 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 187 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 196 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: