It seems that statprof gives some second counts in some other units
than seconds. I'm using guile 2.9.1. Consider the following program:
---cut here---
(import (statprof))
(define (factorial n)
(if (= n 0) 1 (* n (factorial (- n 1)))))
(define (main args)
(statprof-reset 0 50000 #t)
(statprof-start)
(display "Hello\n")
(display (factorial 100000))
(newline)
(statprof-stop)
(statprof-display))
---cut here---
This program gives the following output:
---cut here---
...
% cumulative self
time seconds seconds calls procedure
57.14 1.83 1.83 anon #x55f314c21e40
41.07 111105.81 1.32
/home/tohoyn/tyo/omat/ohj/scheme/muut/statprof-test2.scm:4:0:factorial
1.79 0.06 0.06 anon #x55f314c27a38
0.00 3.21 0.00 ice-9/eval.scm:618:6
0.00 3.21 0.00 ice-9/boot-9.scm:701:0:call-with-prompt
0.00 3.21 0.00
/home/tohoyn/tyo/omat/ohj/scheme/muut/statprof-test2.scm:7:0:main
0.00 3.21 0.00 anon #x55f314c29930
0.00 1.83 0.00 anon #x55f314c1f7e0
---
Sample count: 56
Total time: 3.206961337 seconds (1.765094628 seconds in GC)
---cut here---
Obviously the cumulative time for procedure factorial is not given in
seconds. OTOH the time for procedure main is correct. What is wrong
here?
- Tommi Höynälänmaa