[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The status of statprof
From: |
Andy Wingo |
Subject: |
Re: The status of statprof |
Date: |
Tue, 17 Sep 2013 20:03:00 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
On Tue 17 Sep 2013 14:37, Panicz Maciej Godek <address@hidden> writes:
> So my question is: what is the status of the statprof?
It's fine :)
> (define (increase x)
> (sleep 1)
> (1+ x))
>
> (begin
> (statprof-reset 0 500 #t)
> (statprof-start)
> (let loop ((i 0))
> (if (< i 10)
> (loop (increase i))
> i))
> (statprof-stop)
> (statprof-display))
Statprof runs on SIGPROF ticks, driven by setitimer. These ticks run
after a constant amount of CPU time spent. Your test doesn't consume
any CPU time because it's sleeping, so no ticks get recorded.
Also note that using the "statprof" function is much easier.
Cheers,
Andy
--
http://wingolog.org/