[plt-scheme] profiling
At Mon, 16 Aug 2004 12:22:17 +0200 (CEST), Ivanyi Peter wrote:
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
> Hi,
>
> I have almost finished my application and I would like to do some
> profiling. As I understand there is a profiler in errortrace.ss, however
> I did not manage to make it work. My app is organised into modules
> and I do not know where to require errortrace, inside the module,
> outside, in all of the modules (?). So far it always reports that
> instrumentation is on, but it always returns empty lists as collected
> data. Can somebody tell me how to use the profiler? Is there any other
> way to do profiling?
The profiler is a program that actually manipulates your program; it's
not just a library, so it shouldn't be loaded into your program.
The short answer is: turn on profiling in DrScheme's language dialog
(under show details)
If you don't want to use DrScheme, you can get a textual interface to
your profile results like this:
1) delete all of your .zos
2) create a file called start-profile.ss and put this in it:
(require (lib "errortrace.ss" "errortrace"))
... set profiling parameters ...
(require "myprogram.ss") ;; replace w/ your program of course
3) run mred -qr start-profile.ss (or mzscheme -qr start-profile.ss if
you don't have any GUI stuff in your program)
Robby