Module "Profile.curry"

Preliminary library to support profiling.

Author: Michael Hanus

Version: December 2007


 Exported names:

Datatypes:
ProcessInfo

Constructors:
Choices | Code | ElapsedTime | GarbageCollections | Heap | Memory | RunTime | Stack

Functions:
evalSpace | evalTime | garbageCollect | garbageCollectorOff | garbageCollectorOn | getProcessInfos | printMemInfo | profileSpace | profileTime | showMemInfo


 Summary of exported functions:

getProcessInfos  :: IO [(ProcessInfo,Int)]  deterministic 
          Returns various informations about the current state of the Curry process.
garbageCollectorOff  :: IO ()  deterministic 
          Turns off the garbage collector of the run-time system (if possible).
garbageCollectorOn  :: IO ()  deterministic 
          Turns on the garbage collector of the run-time system (if possible).
garbageCollect  :: IO ()  deterministic 
          Invoke the garbage collector (if possible).
showMemInfo  :: [(ProcessInfo,Int)] -> String  deterministic 
          Get a human readable version of the memory situation from the process infos.
printMemInfo  :: IO ()  deterministic 
          Print a human readable version of the current memory situation of the Curry process.
profileTime  :: a -> IO ()  deterministic 
          Evaluates the argument to normal form and print the time needed for this evaluation.
profileSpace  :: a -> IO ()  deterministic 
          Evaluates the argument to normal form and print the time and space needed for this evaluation.
evalTime  :: a -> a  deterministic 
          Evaluates the argument to normal form (and return the normal form) and print the time needed for this evaluation on standard error.
evalSpace  :: a -> a  deterministic 
          Evaluates the argument to normal form (and return the normal form) and print the time and space needed for this evaluation on standard error.

 Imported modules:

List
Prelude

 Exported datatypes:

ProcessInfo

The data type for representing information about the state of a Curry process.

Constructors:

RunTime :: ProcessInfo

RunTime - the run time in milliseconds

ElapsedTime :: ProcessInfo

ElapsedTime - the elapsed time in milliseconds

Memory :: ProcessInfo

Memory - the total memory in bytes

Code :: ProcessInfo

Code - the size of the code area in bytes

Stack :: ProcessInfo

Stack - the size of the local stack for recursive functions in bytes

Heap :: ProcessInfo

Heap - the size of the heap to store term structures in bytes

Choices :: ProcessInfo

Choices - the size of the choicepoint stack

GarbageCollections :: ProcessInfo

GarbageCollections - the number of garbage collections performed



 Exported functions:

getProcessInfos :: IO [(ProcessInfo,Int)]  deterministic 

Returns various informations about the current state of the Curry process. Note that the returned values are very implementation dependent so that one should interpret them with care!

Further infos:
  • externally defined

garbageCollectorOff :: IO ()  deterministic 

Turns off the garbage collector of the run-time system (if possible). This could be useful to get more precise data of memory usage.

Further infos:
  • externally defined

garbageCollectorOn :: IO ()  deterministic 

Turns on the garbage collector of the run-time system (if possible).

Further infos:
  • externally defined

garbageCollect :: IO ()  deterministic 

Invoke the garbage collector (if possible). This could be useful before run-time critical operations.

Further infos:
  • externally defined

showMemInfo :: [(ProcessInfo,Int)] -> String  deterministic 

Get a human readable version of the memory situation from the process infos.


printMemInfo :: IO ()  deterministic 

Print a human readable version of the current memory situation of the Curry process.


profileTime :: a -> IO ()  deterministic 

Evaluates the argument to normal form and print the time needed for this evaluation.


profileSpace :: a -> IO ()  deterministic 

Evaluates the argument to normal form and print the time and space needed for this evaluation. During the evaluation, the garbage collector is turned off to get the total space usage.


evalTime :: a -> a  deterministic 

Evaluates the argument to normal form (and return the normal form) and print the time needed for this evaluation on standard error. Included for backward compatibility only, use profileTime!

Further infos:
  • externally defined

evalSpace :: a -> a  deterministic 

Evaluates the argument to normal form (and return the normal form) and print the time and space needed for this evaluation on standard error. During the evaluation, the garbage collector is turned off. Included for backward compatibility only, use profileSpace!

Further infos:
  • externally defined


Generated by CurryDoc (Version 0.4.1 of June 7, 2007) at Nov 9 18:03:56 2009