测量执行时间的R是否有标准化的方法?
显然我可以system.time在执行之前和之后采取,然后采取其中的差异,但我想知道是否有一些标准化的方式或功能(想要不发明轮子).
我似乎记得我曾经使用过如下的东西:
somesysfunction("myfunction(with,arguments)")
> Start time : 2001-01-01 00:00:00 # output of somesysfunction
> "Result" "of" "myfunction" # output of myfunction
> End time : 2001-01-01 00:00:10 # output of somesysfunction
> Total Execution time : 10 seconds # output of somesysfunction
Run Code Online (Sandbox Code Playgroud)