Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to benchmark a Kotlin Program?

Are there any tools available the can help benchmark some code in 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!

like image 469
bkach Avatar asked Mar 11 '16 01:03

bkach


1 Answers

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.

like image 75
Ruslan Avatar answered Oct 25 '22 07:10

Ruslan