Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java benchmark time

public class SomeClass{
   public void somePublicMethod()
   {
       long startTime = System.currentTimeMillis();
       someMethodWhichYouWantToProfile();
       long endTime = System.currentTimeMillis();
       System.out.println("Total execution time: " + (endTime-startTime) + "ms"); 
   }
 }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #benchmark #time
ADD COMMENT
Topic
Name
5+9 =