java - Eclipse怎么统计程序运行了多久?
PHP中文网
PHP中文网 2017-04-17 17:59:20
0
3
509

想知道这个代码道理会运行多久,之前用过matlab它可以很方便的一键统计,Eclipse可以吗?还是只能getsystemtime自己处理了?

PHP中文网
PHP中文网

认证0级讲师

reply all(3)
迷茫

Use log, you can calculate the specific running time through log code, of course System.currentTimeMillis().

洪涛

Shouldn’t counting code running time be done at the code level? I don’t know if Eclipse has this function, but I’ve never seen it.

阿神
用JUnit的测试用例啊,通过添加注解,可以测试程序的执行时间,非常方便的。
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template