Check if Threads and VM Telemetry Overview windows are opened. Check if both windows are scrolling automatically their contents.

There should not be any thread in threads window with 'Profiler' in its name.

Select a thread in Threads view and invoke Thread details action in its popup menu.

Check if Details tab in Threads window is selected and if it contains thread's name, 'pie chart' with statistics and line graph with colored thread's states.

Select one thread's state section in the line graph. Check if Details sub tab with textual states information is opened and appropriate state is selected.

Invoke VM Telemetry button in Profiler Control Panel.

Press Zoom Out button (-) until whole Memory (Heap) graph panel is visible. Its horizontal scroll bar should be disabled but visible to prevent graph bumping on resize. Check if the zoomed out graph is alive.

Switch to Memory (GC) graph panel and press Scale to Fit button. Whole graph should be scaled into graphs' boundaries. Wait a moment - graph should be alive and it should be shrunk to the panel boundaries - horizontal scrollbar should be disabled. The Scale to Fit button should be replaced by Fixed Scale button.

Switch to Threads / Loaded Classes graph panel and check it is live

Open Threads window. Go To Profiled Application and close it.

Go back to profiler. There should be shown Information dialog 'The profiled application has finished ...'.

Confirm the dialog and check the Threads window. There should not be any thread with 'Profiler' in its name or any new thread created during finishing of application.

Profiled application should be stopped. All graphs should be stopped too.

Invoke Save Current View to Image button in any graph panel. There should be opened a Select File or Directory with file system structure, preview of the view and PNG in Files of Type. Write a filename and confirm the dialog. Snapshot of selected view should be stored on disk as png file.

Switch to VM Telemetry and click Export to.... Save in all possible formats and check that the created files are in correct format.

Close Profiler panel. Invoke Window -> Profiling -> Profiler and Profiler panel should be opened again.

Invoke Profile -> Profile Project... action. Select Analyze Performance task, set Advanced (instrumented) and Filter: Profile All Classes. Press Run button. Wait until the application is started. Open Live Results window. (Check: Then close and invoke Window -> Profiling -> Live Results)

Go to Method Name Filter_ (bottom of live results panel) and select Contains filter type. Write com.toy and press Enter. Live results table should contain only com.toy.* methods.

Uncheck Update Results Automatically toggle button in Live Results tool bar and write a word in the application and click Guess. The results table should not change. Let it several seconds to ensure that table doesn't change.

Press Update Results Now button - results table should change then.

Go to Method Name Filter and press Clear filter button in the right - table should contain all methods again. Try to select e.g. Regular expression filter type - write .*Map.* to the text field and press Apply filter button - there should be shown mostly methods from java.util.*.

Invoke Save Current View to Image button in Live Results toolbar. There should be opened a Select File or Directory with file system structure, preview of the view and PNG in Files of Type. Write a filename and confirm the dialog. Snapshot of selected view should be stored on disk as png file.

Invoke Take Snapshot in Live Results toolbar. After invoking of the action a new CPU snapshot should be opened. Switch back to Live Results window.

Check sorting of results table by each column - press the column title bar.

Sort table by Self Time [%]. Press Show or hide results columns button in the right-top corner, uncheck Self Time, Total Time, Invocations, Filter items. There should remain only two columns in Live Results table sorted by Self time [%]. Press the button again and enable all items in the menu. All columns should be shown as before.

Select a method in results table and invoke its popup menu. Press Go To Source menu item. There should be opened Java editor with source of the class or shown status message "Can not resolve class..."

Move mouse over a method with a long name (not fully displayed in results table). A tooltip should be shown in place of the method's name containing full name of the method (not available on Mac).

Click Export to... and check it is saved correctly in all formats.

Call Profile -> Stop Profiling Session from main menu.

Analyze Performance - DrillDown

Invoke Profile -> Rerun Profiling Session. Wait until the application is started. Open Live Results window. Make some actions in started application.

Click DrillDown button. DrillDown window should be opened and bound to the right side of Live Results panel. The DrillDown window should contain Scope part with pie chart and its legend where legend and pie chart items are selectable. After selection of an item Live Results should be filtered to focus only on the selected category of methods.

Try to resize drilldown window and check if it is repainted correctly. Open Anagrams.java form, switch between Live Results and editor and check if DrillDown window is shown only with Live Results window. Try to switch off and on the Drilldown window by DrillDown button.

Press Shift+F2 to stop profiling session.

Analyze Performance - Snapshots

Go to Profiler tab and invoke Rerun Last Profiling Session

Check Take Snapshot button - it should be enabled during starting of the application. Press the button immediately after it is enabled.

Wait until the application is fully started and close it.

There should appear "Application Finished" dialog asking if you want to take a snapshot of the finished application. Click Yes button.

Check if both taken snapshots contain measured data. The second snapshot should contain more measured methods than the first.

Go to the first snapshot and try to close it. It should ask if you want to save the snapshot. Press No button.

In the remaining snapshot window invoke Save Snapshot to Project from toolbar, close it and open it again from Saved Snapshots list in Profiler panel.

Press Ctrl+F to open find dialog, write e.g. "show" into it and confirm. Try to jump through all occurrences of the word by pressing F3.

Try to change View from Methods to Classes or Packages - the results tree should be changed by appropriate way. Return back to Methods view.

Check sorting of the results tables by each column - press the column title bar.

Invoke Save Current View to Image button in the snapshot's toolbar. There should be opened a Select File or Directory with file system structure, preview of the view and 'PNG' in Files of Type combo. Write a filename and confirm the dialog. Snapshot of selected view should be stored on disk as png file.

Go to e.g. "java.awt.Component.show(boolean)", invoke popup menu on it and press Show Back Traces action. It should switch to "Back Traces for: show" tab.

Select Combined tab of the snapshot window, try to select methods in both parts of split panel and check if there is always selected counterpart method in the other panel.

Go to Hot Spots tab, find "com.toy.anagrams.ui.Anagrams.main" and double click on the method. It should jump into Java editor with Anagrams.java to the selected method's code.

Browse Info tab panel of the snapshot. Try editing user comments, see if they persist.

Close snapshot.

Select the snapshot in Saved Snapshots list of Profiler panel, rename the snapshot using the Rename button, press Save As... button, choose a path and file name and save the snapshot there.

Delete the snapshot by Delete button.

Invoke Profile -> Load Snapshot... action from main menu, select the previous file and confirm file dialog. The snapshot should be loaded.

Analyze Performance - Root Methods

Right-click AnagramGame project node and choose Profile. Select CPU -> Analyze Performance, set Advanced (instrumented) and Filter: Profile All Classes. Press Run button. Wait until the application is started. Open Live Results window.

Click Guess button in the application. Go to live results table, find the "com.toy.anagrams.ui.Anagrams.guessedWordActionPerformed(java.awt.event.ActionEvent)" method, invoke its popup menu and select Add to Instrumentation Roots.... In the opened "Select Settings Configuration" dialog select Analyze Performance item and click OK button.

Click Run button. Wait until the application is started and open Live Results window.

Look at "Basic Telemetry" part of Profiler panel and remember number of instrumented methods. Press Guess button in the profiled application and watch the Live Results and Basic Telemetry. The number of instrumented methods should increase. Press New Word button in the application - another methods should be measured/instrumented

Invoke Reset Collected Results. Live Results window should be emptied. Switch to the profiled application window - no methods should be shown in Live Results window.

Invoke File -> About action in the profiled application - live results should not be changed.

Invoke Save Current View to Image button in Live Results toolbar. There should be opened a Select File or Directory with file system structure, preview of the view and PNG in Files of Type. Write a filename and confirm the dialog. Snapshot of selected view should be stored on disk as png file.

Invoke Take Snapshot in Live Results toolbar

Switch back to "Live Results" and check sorting of results table by each column

Go to "Class Name Filter" (bottom of live results panel). Write String and press Enter. Live results table should contain only 'Strings'. Press Clear filter - button with red cross on the filter line. Table should contain all classes again.

Go to Live Results. Sort results by "Class Name" ascending. Scroll to the first class from package "sun.awt", right-click and choose Stop Profiling Classes bellow this line action. Right-click again and choose Stop Profiling this Class.

Check stopped classes dismiss from view.

Analyze Memory Usage - Class History

Right-click "char[]" object and choose Log Class History.

Press Scale to Fit button.

Invoke some actions in profiled application. Try to invoke Run GC action from Profiler Control Panel several times.

Invoke Save Current View to Image button in Live Results toolbar. Select file name and save it.

Go back to "Live Results" tab, select "int[]" class and invoke Log Class History on it. The History tab name should be changed to "History of int[]", values in the graph should be changed too.

Invoke Reset Collected Results Buffer action and make some action in AppletViewer again. Live Results should be empty and after the actions in viewer filled again.

Close the AppletViewer window and confirm Application Finished dialog.

Profile Applet - Browser

Disable security restrictions on your system. For example on windows open Java from Control Panel, switch to Security tab and decrease security level to Medium. Click OK and restart your browser. Also keep in mind that if applet runs in 32-bit Java in browser, you have to run IDE with 32-bit JDK too.

Switch to Files view and go to "AppletTest -> build -> TestApplet.html". Invoke popup menu and View action on the html file. A browser should be opened with TestApplet started.

Invoke main menu Profile -> Attach Profiler

In "Attach Profiler" dialog select AppletTest project in top most combo box "Attach to:" and check profiling roots are set from previous test case (just one method).

In New Custom Configuration (CPU) dialog change its name to "testconfig" and click OK.

Select Advanced (instruments) and click Advanced Settings link.

Select Exact call tree, sampled timing.

Execute profiling by Run button and watch Take Snapshot button. Immediately after the button is enabled, press it. It should take non empty CPU snapshot - close it without saving. Wait until whole application is started.

In the started application open New Canvas and paint something there. Close the application and confirm "Application finished dialog" in profiler by Yes button.

In the taken snapshot go to Hot Spots, find method "org.netbeans.paint.PaintCanvas.mouseDragged", invoke its popup menu and select Add to Instrumentation Roots. In "Select Settings Configuration" dialog select "testconfig" configuration and confirm it by OK button.

Open "Live Results" window - it should be empty. Go to the profiled application, create New Canvas and try to draw something. Method mouseClicked should be displayed in Live Results window.

Right-click org.netbeans.paint.PaintCanvas.mouseClicked(java.awt.event.MouseEvent) method and choose Go To Source. There should be opened editor with the selected class and its cursor should be moved to the selected method.

Check if Threads and VM Telemetry Overview windows are opened. Check if both windows are scrolling automatically their contents.

There should not be any thread in threads window with Profiler or JFluid in its name.

Right-click a thread in Threads view and choose Thread Details.

Check if Details tab in Threads window is selected and if it contains thread's name, pie chart with statistics and line graph with colored thread's states.

Select one thread's state section in line graph. Check if Details sub tab with textual states information is opened and appropriate state is selected.

Invoke VM Telemetry button in Profiler control panel.

Press Zoom Out button (-) until whole Memory (Heap) graph panel is visible. Its horizontal scroll bar should be disabled but visible to prevent graph bumping on resize.

Switch to "Memory (GC)" graph panel and press Scale to Fit button. Whole graph should be scaled into graphs' boundaries - horizontal scroll bar should be disabled. The "Scale to Fit" button should be replaced by "Fixed Scale" button.

Switch to "Threads/Loaded Classes" graph panel and use mouse wheel to zoom out and in.

Open Threads window. Go To Services view and stop GlassFish.

Information dialog The profiled application has finished ... is opened. Wait a few seconds - Threads window on background should continue in showing new states of threads.

Confirm the dialog and check the Threads window is stopped.

Invoke Save Current View to Image button in any graph panel and try to save it.

If you are attaching profiler for the first time, "Attach Mode" is not yet defined - click define.... Otherwise click change... at the bottom of "Attach Profiler" dialog and select Local and Dynamic type.

Click Attach.

Select Anagrams process and click OK.

Open "Live Results", click something in profiled application and check methods from AnagramGame project are displayed.

Click Detach from the Profiled Application in Profiler panel.

Click Yes in "Detach Profiler" window and check profiler is stopped and profiled application is terminated.

Click copy to clipboard and then two times OK to confirm "Attach Settings" window.

Click Cancel in "Attach Profiler" window.

Right-click AnagrameGame project node and choose Properties.

Go to Run category, paste content of clipboard to "VM Options" text field and click OK.

Run AnagramGame project. It should print to console "Profiler Agent: Waiting for connection on port 5140".

Choose Attach Profiler from main toolbar and click Attach.

Check that methods from AnagramGame project are displayed in "Live Results".

Invoke Profile -> Detach... from main menu.

Click Yes in "Detach Profiler" window and check profiler is stopped and profiled application is terminated.

Remove agentpath from project properties.

Remote

Invoke Profile -> Attach Profiler... from main menu.

Click change... at the bottom of "Attach Profiler" dialog and select Remote target.

Type localhost in hostname text field and select appropriate OS and JVM.

Click create a Remote profiling pack, save it to some empty folder and click OK in confirmation dialog.

Click OK in "Attach Settings" dialog.

Click Cancel in "Attach Profiler" window.

Unzip remote pack, go to bin folder and from command-line run calibration.

Copy anagrams.jar from AnagramGame/dist folder to remote pack bin folder (run Clean and Build on project if dist does not exist yet).

Set JAVA_HOME property to valid value.

Run profile-16.* -jar anagrams.jar

It should print to console "Profiler Agent: Waiting for connection on port 5140" and wait.

Return to IDE and invoke Profile -> Attach Profiler... from main menu.

Click Attach and check methods from AnagramGame project are displayed in "Live Results".

Invoke Profile -> Detach... from main menu.

Click Yes in "Detach Profiler" window and check profiler is stopped and profiled application is terminated.

Test suite: HeapWalker

Summary

Right-click project node and choose Profile

Select CPU -> Advanced -> Profile only project classes and click Run.

Open "Live Results" and wait until application is started.

Click Dump Heap, choose destination to "Custom Directory" and click No to not open it in HeapWalker.

Click something several times in profiled application.

Click Dump Heap again, choose destination to "Profiled Project" and click Yes to open it in HeapWalker.

Check Summary view contains overall data. Click Show System Properties and Show Threads. Check links in stack traces are valid.

Click link in "Application windows" and return back to Summary panel.

Click Find to search for biggest objects by retained size. Confirm question dialog and when finished click some links to get to Instances view.

Close heap dump and open it again from "Saved Snapshots".

Classes

Switch to Classes page.

Check sorting of table by each column - press the column title bar.

Press Show or hide columns small button in the right-top corner of the table, uncheck Instances, Size, Filter items. There should remain only two columns in the table. Press the button again and enable all items in the menu.

Select java.lang.String class and press Static Fields button (top-right corner of window). Static Fields panel should be inserted to the right side of heapdump window. There should be shown all static fields of String class (class, serialVersionUID etc.). There should be shown icons legend in the bottom line of the window (Array Type, Object Type etc.)

Right-click java.lang.String and choose Go to Source. It should open source file of java.lang.String class in editor and move cursor to class definition. (It doesn't work on some JDKs on mac os x).

Click Compare with another heap dump link at the top right of Classes tab. Browse for heap dump previously stored at custom folder.

Review plus and minus values across table and click reset view.

Instances

Right-click java.lang.String and choose Show in Instances View.

Try to close and open again all panels in Instances view. Use 'x' buttons in right-top corner of each panel and buttons with icons on heap dump window toolbar. Try to change size of panels - after closing and opening again the size of panel should be preserved.

Check the legend line bellow the toolbar - there should be name of class and some statistics about it.

Try to switch on and off all available columns in each panel by Show or hide columns button (top-right corner of each panel).

Try to sort instances list table by particular columns - press title of the column.

Find a table cell (mostly in Fields or References panels) which's content is not fully displayed (ends by ...). Move mouse cursor over the cell and check if its full content is shown in appeared tooltip.

Click on the retained size link at the top right - the retained sizes should be computed and displayed in new column.

Sort instances by retained size and select first item. Check there is value partially shown in description panel. Click Show all to see entire value. Click Save to file and save value to disk.

Right-click a node of non-primitive type in Fields or References panel and choose Show Instance. Instances of the class should be displayed in heap dump window and there should be selected the instance in Instances list panel.

Click Navigate back arrow in toolbar.

Right-click a node of non-primitive type in Fields panel and choose Show in Classes View. Classes view should be displayed in heap dump window with the selected class. Return back to Instances.

Right-click a node of non-primitive type in Fields or References panel and choose Go to Source. The editor with source of the class should be opened.

Right-click this field in References view and choose Show Nearest GC Root.

Right-click select GC root and choose Copy Path From Root. Check that the path is copied into clipboard.

Press its Guess button five times. "Profiling Points" window should show 5 hits for Stopwatch profiling point and no results available for reset results profiling point.

Click report link for Stopwatch profiling point. Report window should be shown, for each hit timestamp and duration should be shown.

Open Live Results. There should be some measured methods. Click New Word button in profiled application. Live Results should show only two methods from now.

Click report link for Reset Results in Profiling Points window. Report window should be shown, for each hit timestamp should be shown.

Stop Profiling.

Start Profiling again having User defined Profiling Points option disabled. Play with application. No results for profiling points should be shown. Stop Profiling.

Right-click Reset Results in Profiling Points window and select Show in Source menu item. Cursor should be moved to first line of nextTrialActionPerformed method.

Rigth-click its annotation and select Profiling Points > Enabled. Reset Results Profiling point should be shown gray in editor and Profiling Points window.

Right-click Stopwatch in Profiling Points window and select Show Start in Source menu item. Cursor should be moved to first line of guessedWordActionPerformed method. Right-click Stopwatch in Profiling Points window and select Show End in Source menu item. Cursor should be moved to last line of guessedWordActionPerformed method.

Rigth-click its annotation and select Profiling Points > Delete. Stopwatch Profiling point should be removed from editor and Profiling Points window.

Take Snapshot

Open Anagrams.java source file in editor. Move cursor to the first line of method nextTrialActionPerformed (wordIdx ...). Invoke popup menu there and press Profiling > Insert Profiling Point menu item.

Press its New Word button two times. Close the application. Do not take snapshot.

There should be two new snapshots in "Saved Snapshots" part of Profiler panel. Profiling Points window should show 2 hits, and report for Take Snapshot profiling point should contain links to both snapshots. No results should be available for Reset Results Profiling Point.

In profiling points window remove both profiling points.

Timed- and Triggered- Profiling Points

Open Anagrams.java source in editor. Push Shift key and press F9 key several times until Timed Take Snapshot is chosen. Release Shift key. Customize Profiling Point dialog is shown.

Choose Heap dump option, To directory option and enter some directory. Choose Take every option, ensure that 1 minute is chosen. Press OK.