Eclipse to get program runtime

OS: WinXP

In an environment like UNIX, we can get the runtime of $time ./my_program . I wonder if we can get runtime information in Eclipse? Is it possible to do this without a profiler? Thanks.

+6
performance eclipse
source share
2 answers

It seems that the Eclipse TPTP plugin has this feature: http://www.eclipse.org/tptp/

You can get closer to it by the timestamp difference:

  public static void main(String[] args) throws IOException { long start = System.currentTimeMillis();; new MyApplication(); long end = System.currentTimeMillis();; System.out.println((end - start) + " ms"); } 

This will print the runtime in ms.

+4
source share

You can configure the launch of the program. Go to the Run | Run ... to open the Run Dialog box. Add the time command to display the runtime in the console.

0
source share

All Articles