[plt-scheme] Profiling...

From: Matt Jadud (mcj4 at kent.ac.uk)
Date: Wed Jun 14 09:17:03 EDT 2006

Invariably, I misunderstood something in the documentation for 
errortrace. I also made use of Danny's notes at [1] that provided a few 
pointers.

A module 'foo', saved in 'foo.scm':

==========
(module foo mzscheme
   (require (lib "errortrace.ss" "errortrace"))
   (instrumenting-enabled #t)
   (profiling-enabled #t)
   (profiling-record-enabled #t)
   (profile-paths-enabled #t)

   ;; Perhaps I might 'require' a module here?

   (define (fact n)
     (if (zero? n)
         1
         (* n (fact (sub1 n)))))

   (fact 5)

   (output-profile-results #t #t)
   (exit))
==========

outputs:

==========
[Lyra] usb > mzscheme349.100 -t-- foo.scm
Welcome to MzScheme version 349.100, Copyright (c) 2004-2006 PLT Scheme Inc.
Sorting profile data...
Total samples: 0
==========

I'm a bit at a loss as to what I should do to get profiling data out. 
I'm using the 349.100 binary for OSX, but the behavior is consistent 
whether I use 349.100, 301.14, or 300... which implies I'm doing 
something wrong.

I'll keep looking, and probably realize some bone-headed mistake myself 
in a minute...

Cheers,
Matt



[1] http://hkn.eecs.berkeley.edu/~dyoo/plt/python-to-plt.txt



Posted on the users mailing list.