What does Netbeans Profiler "Self Time" really mean?

I was wondering how my simple game should start, so I used the Java Netbeans profiler (Java 1.7), and I see the “Self Time” and “Invocations” columns in the “Hotspots” tab.

For example, my render method has:

Battery Life : 1025 ms

Invocations : 2311

So, if I understand well, does this really mean that the total amount of time for all calls to the visualization method together gives 1025 ms, and the average execution time of one method is 1025/2311 = 0.44 ms

If so, can I get the IDE to display average time instead of total time?

+7
source share
1 answer

Typically, "self time" measures the time spent inside the body of a method, with the exception of the time spent on methods that it calls. For example, let's say you had a simple method for retrieving sorted users getUsers , which called two methods that themselves did not call other calls.

 UserList getUsers() { return sortUsers(loadUsers()); } 

Since getUsers does not work, its time itself will be very low, although calling a method is expensive.

 Method Self Time Call Time ----------- --------- --------- getUsers 3 ms 1,184 ms loadUsers 923 ms 923 ms sortUsers 258 ms 258 ms 

This is based on other profiles that I used - not NetBeans. Hope someone can confirm or deny it for NetBeans itself.

+19
source

All Articles