REBOL 3 Docs Guide Concepts Functions Datatypes Errors
  TOC < Back Next >   Updated: 3-Aug-2010 Edit History  

REBOL 3 Functions: stats

stats  /show  /profile  /timer  /evals

Provides status and statistics information about the interpreter.


/show - Print formatted results to console

/profile - Returns profiler object

/timer - High resolution time difference from start

/evals - Number of values evaluated by interpreter

See also:

help   trace  


The STATS function returns a wide range of useful REBOL system statistics, including information about memory usage, interpreter cycles, and more.

If no refinement is provide, STATS returns the amount of memory that it is using. This value must be computed from tables.

The /pools refinement returns information about the memory pools that REBOL uses for managing its memory.

The /types refinement provides a summary of the number of each datatype currently allocated by the system.

foreach [type num] stats/types [
    print [type num]

The /series shows the number of series values, both string and block oriented, as free space, etc.

The /frames provides the number of context frames used for objects and functions.

The /recycle option summarizes garbage collection information.

The /evals provides counters for the number of interpreter cycles, functions invoked, and blocks evaluated.

The /clear refinement can be used with the /evals refinement to clear its counters.

loop 100 [print "hello"]
print stats/evals

  TOC < Back Next > - WIP Wiki Feedback Admin