24 #if ! defined (octave_profiler_h)
25 #define octave_profiler_h 1
27 #include "octave-config.h"
45 template <
typename T>
class enter
62 fcn = t.profiler_name ();
91 void set_active (
bool);
117 static octave_value function_set_value (
const function_set&);
142 void build_flat (flat_profile&)
const;
147 octave_value get_hierarchical (
double* total = 0)
const;
154 typedef std::map<octave_idx_type, tree_node*>
child_map;
194 double query_time ()
const;
199 void add_current_time (
void);
211 #define BEGIN_PROFILER_BLOCK(classname) \
213 profile_data_accumulator::enter<classname> pe (profiler, *this);
215 #define END_PROFILER_BLOCK \
216 } // end of block => call pe's destructor
function_set known_functions
std::map< std::string, octave_idx_type > fcn_index_map
OCTAVE_EXPORT octave_value_list return the number of command line arguments passed to Octave If called with the optional argument the function t
enter(profile_data_accumulator &a, const T &t)
bool is_active(void) const
calling an anonymous function involves an overhead quite comparable to the overhead of an m file function Passing a handle to a built in function is because the interpreter is not involved in the internal loop For a
std::vector< std::string > function_set
std::vector< stats > flat_profile
void exit_function(const std::string &)
std::set< octave_idx_type > function_set
OCTINTERP_API profile_data_accumulator profiler
std::map< octave_idx_type, tree_node * > child_map
void enter_function(const std::string &)
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
profile_data_accumulator & acc