Time
如何衡量我使用編輯器的時間?
有誰知道如何解決以下問題:程式課程想要測量解決這些練習需要多少時間。我使用 Ubuntu 19.04。假設我使用 Visual Studio Codium 編寫程式碼,並且在一周內不使用任何其他項目。我如何衡量編輯器在給定的一周執行了多長時間?
一種方法是使用
acct
會計實用程序。從 debian 包描述:
$ apt-cache show acct Package: acct Version: 6.6.4-2 Installed-Size: 341 Maintainer: Debian Security Tools <team+pkg-security@tracker.debian.org> Architecture: amd64 Depends: libc6 (>= 2.14), lsb-base Description-en: GNU Accounting utilities for process and login accounting GNU Accounting Utilities is a set of utilities which reports and summarizes data about user connect times and process execution statistics. . "Login accounting" provides summaries of system resource usage based on connect time, and "process accounting" provides summaries based on the commands executed on the system. . The 'last' command is provided by the sysvinit package and not included here.
首頁:http ://www.gnu.org/software/acct/
該軟體包包括一個名為
sa
. 您可能需要編寫腳本awk
或perl
其他東西來將sa
的輸出後處理成您想要的確切形式。