Mercurial > octave
diff src/profiler.h @ 13188:6d57e53b21ea
Add field for total time to hierarchical profile.
profiler.h: Add new argument (for additional output) to get_hierarchical.
profiler.cc: Calculate total time when generating the hierarchical profile.
author | Daniel Kraft <d@domob.eu> |
---|---|
date | Thu, 22 Sep 2011 20:51:30 +0200 |
parents | e81ddf9cacd5 |
children | 72c96de7a403 |
line wrap: on
line diff
--- a/src/profiler.h Mon Sep 19 09:37:52 2011 -0700 +++ b/src/profiler.h Thu Sep 22 20:51:30 2011 +0200 @@ -23,6 +23,7 @@ #if !defined (octave_profiler_h) #define octave_profiler_h 1 +#include <cstddef> #include <map> #include <set> #include <string> @@ -113,7 +114,11 @@ tree_node* exit (octave_idx_type); void build_flat (flat_profile&) const; - octave_value get_hierarchical (void) const; + + // Get the hierarchical profile for this node and its children. If total + // is set, accumulate total time of the subtree in that variable as + // additional return value. + octave_value get_hierarchical (double* total = NULL) const; private: