Sample Header Ad - 728x90

Does the time command include the memory claimed by forked processes?

0 votes
3 answers
497 views
I want to benchmark some scripts with the time command. I am wondering if this command catches child processes' memory usage.
command time -f '%M' python my_script.py
If not, what are my options? Is valgrind suitable for this purpose? I also don't want to double count copy-on-write memory that is not actually filling up space.
Asked by HappyFace (1694 rep)
Jan 19, 2022, 12:29 PM
Last activity: Jul 13, 2025, 01:44 PM