linux - ubuntu如何查看C语言程序执行时间和程序的内存使用情况?
阿神
阿神 2017-04-17 16:49:20
0
2
455
阿神
阿神

闭关修行中......

reply all(2)
左手右手慢动作

Suppose you run the program ./test. After running (or while running), enter ps aux | grep test, and the meaning of the returned information is ps aux | grep test,返回的信息含义为


这其中就有CPU使用、内存使用情况,以及运行时间。
特别的,如果需要在程序运行中实时查看这些信息,输入top | grep test,就会每一秒显示一次,Ctrl + C


Among them are CPU usage, memory usage, and running time.
Specially, if you need to view this information in real time while the program is running, enter top | grep test, it will be displayed once every second, and Ctrl + C will exit. 🎜
伊谢尔伦

time test, add time in front to display the time

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!