I would like to profile my spark scala applications to figure out the parts of the code which i have to optimize. I enabled -Xprof in --driver-java-options but this is not of much help to me as it gives lot of granular details. I am just interested to know how much time each function call in my application is taking time. As is other stackoverflow questions, many people suggested YourKit but it is not inexpensive. So i would like to use something which is not costly in fact free of cost.
Are there any better ways to solve this ?