
ES2 mudlib - FF extension v0.6c 函式說明書

程式: /adm/daemons/profiled.c

	此物件負責記錄各命令執行的情形. 要啟動記錄的功能, 要在
	/feature/command.c 中定義 PROFILE_COMMANDS , 每個人執行的每個
	命令才會呼叫底下的 log_command() 記錄下來.
	平時沒事用不著開啟本功能, 不但浪費 CPU 和記憶體, 本 daemon
	也只能記錄有限的命令個數, 紀錄一下子就滿了.
	只有在壓榨系統資源時, 才需要開啟本功能觀察命令的執行狀況.

void log_command( string entry, int mem, int stime, int utime )

	參考 /feature/command.c #ifdef PROFILE_COMMANDS 和 #endif
	之間的程式, 只要有定義, 每道命令都會呼叫此函式記錄其資料.

void make_profile( string sort_by )

	把記錄在 command_log 變數的內容, 傾印在 /PROFILE 中.

int sort_entry( string entry1, string entry2 )

	用來排序.

Spock of The Final Frontier	98.Sep.23.
