blob: c5f22827c4dc4f7e17f279e3af7f8295c219e78e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
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]
}
}
} else {
load matjuprofiler/matjuprofiler.so
}
|