diff options
Diffstat (limited to 'desiredata/src/profile_dd.tcl')
-rw-r--r-- | desiredata/src/profile_dd.tcl | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/desiredata/src/profile_dd.tcl b/desiredata/src/profile_dd.tcl new file mode 100644 index 00000000..12c98a56 --- /dev/null +++ b/desiredata/src/profile_dd.tcl @@ -0,0 +1,20 @@ + +if 1 { + puts "profiler version [package require profiler]" + profiler::init + # try just: prof + # or try: prof calls + proc prof {{arg totalRuntime}} { + set dump [profiler::dump] + #foreach {a b} $dump {foreach {c d} $b {set prof($a:$c) $d}} + set top [profiler::sortFunctions $arg] + foreach entry $top { + mset {k v} $entry + if {!$v} {continue} + puts [format "%8d %s" $v $k] + } + } +} +if 0 { + load matjuprofiler/matjuprofiler.so +} |