如何对Kotlin程序进行基准测试? [英] How to benchmark a Kotlin Program?
问题描述
有没有可用的工具可以帮助对Kotlin中的某些代码进行基准测试?
Are there any tools available the can help benchmark some code in Kotlin?
我可以使用类似于此处建议的方法: http ://www.ibm.com/developerworks/java/library/j-benchmark1/index.html -但我想知道是否有任何Kotlin本机工具,因此我不必重新发明滚轮!
I can use something similar to the approaches suggested here: http://www.ibm.com/developerworks/java/library/j-benchmark1/index.html - but I was wondering if there were any Kotlin native tools, so that i wouldn't necessarily have to reinvent the wheel!
推荐答案
要进行基准测试,请使用 JMH .该框架可以帮助您编写最相关的基准测试,并充分了解JVM的工作方式. github 上有一个旧项目,但我希望您可以更新版本就可以了.
For benchmarking use JMH. This framework can help you write most relevant benchmark, and know a lot about how JVM works. There are old project on github, but i hope you can just update versions and you good.
这篇关于如何对Kotlin程序进行基准测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!