28.04.2019 Views

[JAVA][Beginning Java 8 Games Development]

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Profiling Your <strong>Java</strong> 8 Game Application CPU Usage<br />

Chapter 2 ■ Setting Up Your <strong>Java</strong> 8 IDE: An Introduction to NetBeans 8.0<br />

Using the Profile Project menu item or shortcut icon will open the Profile InvinciBagel (your game project’s name)<br />

dialog, as shown in Figure 2-14. Let’s click the center CPU button at the left of the dialog, which will put the dialog in<br />

Analyze Performance (selection characteristics) mode. You will look at profiling memory use a bit later on (see the<br />

section “Profiling Your <strong>Java</strong> 8 Game Application Memory Usage”). The Monitor (button) option enables real-time<br />

thread monitoring, which can be used while you write your <strong>Java</strong> code.<br />

Figure 2-14. Set the filter, using the drop-down menu in the Profile Project dialog, and select the Advanced<br />

(instrumented) output setting<br />

In this dialog, you can select a Quick profile or an Advanced profile, which has graphical instruments that show<br />

the performance visually. As you can see, this is the option selected as well as the Profile only project classes option<br />

from the Instrumentation Filter drop-down menu. Leave Use defined Profiling Points selected to get NetBeans 8.0<br />

to do the maximum amount of profiling work possible. Note as well the Overhead gauge (indicator) at the bottom of<br />

the dialog, indicating a 50 percent value.<br />

The first time that you run the NetBeans profiling tool, it needs to calibrate your workstation, as every<br />

workstation will have different characteristics, such as the amount of memory and number of CPU cores, or<br />

processors.<br />

www.it-ebooks.info<br />

33

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!