blob: 12c98a56cffd33e623a346e2fab3fb1cd477f291 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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
}
|