Previous: , Up: Guile API Reference   [Contents][Index]


6.4 Guile Utilities Reference

The following function makes very easy writing benchmark scripts in Guile, as you only have to use the module (mbenchmark), register your tests and call main:

Guile Function: main args

Preconditions:

  1. args is a list of strings.

Effects:

  1. Parse the command line:
  2. If argv contains the parameters --help, --version or an unrecognized parameter, call exit with the corresponding value.
  3. Execute the registered tests.
  4. Print the results.

Postconditions:

  1. The standard output, or the output file provided through the command line parameters, was flushed.

The following functions control the log level of the library:

Guile Function: set-log-level! level

Preconditions:

  1. level is the symbol eq? to 'error ,'warn, 'info, 'debug or 'trace.

Effects:

  1. Change the library log level.

Postconditions:

  1. Only messages from the level provided or higher will be printed.

Guile Function: set-module-log-level! module level

Preconditions:

  1. level is the symbol eq? to 'error ,'warn, 'info, 'debug or 'trace.

Effects:

  1. Change module log level.

Postconditions:

  1. The module of the library provided whose name was provided as module only emits log messages of the level provided or higher.