如何在Rust中对程序进行基准测试?例如,如何获得以秒为单位的程序执行时间?
最佳答案
This answer is outdated! The
time
crate does not offer any advantages overstd::time
in regards to benchmarking. Please see the answers below for up to date information.
您可以尝试使用time crate对程序中的各个组件进行计时。
关于time - Rust中的基准测试程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63237252/