sunterlib/s48/profile
Martin Gasbichler e6537c7ca6 Insert (install-lib-version (1 0)) 2004-03-27 06:59:16 +00:00
..
AUTHORS Changed to new package system. 2004-03-10 17:23:45 +00:00
BLURB added mini-profiler, a minimalistic profiler for scheme48 and scsh 2004-02-25 10:39:48 +00:00
NEWS Changed to new package system. 2004-03-10 17:23:45 +00:00
README added mini-profiler, a minimalistic profiler for scheme48 and scsh 2004-02-25 10:39:48 +00:00
no-profile.scm added package "no-mini-profiler" with same interface as "mini-profiler" 2004-02-26 15:12:51 +00:00
packages.scm Moved package and interface definition to packages.scm. Generate load scripts. 2004-03-14 22:59:57 +00:00
pkg-def.scm Insert (install-lib-version (1 0)) 2004-03-27 06:59:16 +00:00
profile.scm + fixed bug in table initialization 2004-03-12 08:01:33 +00:00

README

The structure MINI-PROFILER implements a minimalist profiler for
Scheme48 and scsh.  Time is measuered using Scheme48's RUN-TIME
function from TIME.

Functions
=========

  (profile-init!) -> unspecific

  Initialize or reset the profiler.  Calling this function will delete
  all information collected during previous runs of the compiler.

  (display-profile . port) -> unspecific

  Print the profiling information acquired to PORT.  If PORT is not
  specified use CURRENT-OUTPUT-PORT.

Syntax
======

  (account-for name body)

  Evaluate BODY and stop the time needed for doing so.  Account the
  time needed for NAME.  Especially useful for profiling code that
  makes heavy use of high-order functions or lazy evaluation.  Example:

  (define (compile-funcall exp)
    (account-for compile-funcall
      (let ((op  (compile (funcall-op exp)))
            (arg (compile (funcall-arg exp))))
        (lambda (env)
           (account-for eval-funcall
              (op (arg env stop-k)))))))

  define-prof

  DEFINE-PROF is a substitute for Scheme's DEFINE. Mini-profiler
  accounts the time needed to evaluate the procedure bound with DEFINE
  for DEFINE name.