跳轉到內容

Rebol 程式設計/統計

來自華夏公益教科書,開放的書籍,開放的世界
STATS /pools /types /series /frames /recycle /evals /clear 

系統統計資訊。預設情況下,返回使用的總記憶體。

STATS 是一個本地值。

  • /pools -- 返回:寬度單位、可用單位、每分配單位、段、使用記憶體
  • /types -- 返回:資料型別計數
  • /series -- 返回:總塊、字串、其他可用、空閒、擴充套件
  • /frames -- 返回:總使用、未使用、空閒、值總計
  • /recycle -- 返回:計數、系列總計、系列最後、幀總計、幀最後、壓艙物
  • /evals -- 返回:值、函式、塊
  • /clear -- 清除 evals 計數器

原始碼

[編輯 | 編輯原始碼]
stats: native[
    {System statistics.  Default is to return total memory used.} 
    /pools {Returns: width units free-units units-per-alloc segments mem-in-use} 
    /types "Returns: Datatype count" 
    /series {Returns: total blocks strings other avail free expansions} 
    /frames "Returns: total used unused free values-total" 
    /recycle {Returns: count series-total series-last frames-total frames-last ballast} 
    /evals "Returns: values functions blocks" 
    /clear "Clears the evals counters"
]
華夏公益教科書