9

I am using IntelliJ IDE for Java application development. I was wondering if there is a way to calculate the time it takes for a particular function to complete from IntelliJ.I googled around but some mentioned about dotTrace but I couldn't really get a grasp of, if it can be linked from IntelliJ. Any links or answers if its possible is highly appreciated.

Thanks

Shenoy Tinny
  • 1,315
  • 10
  • 22
  • 34
  • There is an IntelliJ plugin for JProfiler: https://plugins.jetbrains.com/plugin/253?pr= maybe have a look at that? – beresfordt Feb 20 '15 at 23:47
  • 1
    There is an IntelliJ plugin for [jmh](https://plugins.jetbrains.com/plugin/7529?pr=). Use it. – Boris the Spider Feb 20 '15 at 23:49
  • 1
    dotTrace is a profiling tool for .NET applications; it does not include any Java support and cannot be used with IntelliJ. – yole Feb 21 '15 at 08:16

1 Answers1

1

Simple way to calculate performance, please use nano second time and estimate precise time with that. i follow the below approach,

long startTime = System.nanoTime();
// TODO - Call Function Here
long endTime = System.nanoTime() - startTime;

parrotjack
  • 432
  • 1
  • 6
  • 18