Specifying a Root Method

See Also

When analyzing application performance, you can choose to limit the source code that is instrumented by specifying a root method. When you profile an application by instrumenting a root method, profiling data is collected when one of the application's threads enters and leaves the root method.

When you specify a root method, the method is added to the list of selected root methods which you can choose to instrument when profiling application performance. The selected root methods are listed in the Specify Root Methods dialog box. Each profile application performance configuration is associated with a specific set of selected root methods.

To specify a single root method in a class:

  1. Locate the class containing the method you want to add and open the class in the Source Editor.
  2. In the Source Editor, right-click in the method you want to add and choose Profiling > Add as Profiling Root Method.
  3. Select a profiling configuration and click OK.

When you click OK, the method is added to the root methods that are associated with that profiling configuration.

To specify multiple root methods in a class:

  1. Locate the class containing the method you want to add and open the class in the Source Editor.
  2. In the Source Editor, right-click in the source code and choose Profiling > Select Profiling Root Methods.
  3. Select a profiling configuration and click OK to open the Select Root Methods dialog box.
  4. Expand the package and method nodes, select the methods you want to add as root methods and click OK.

When you click OK, the selected methods are added to the root methods that are associated with that profiling configuration.

Note: If you right-click in an object that is part of another class, the Select Root Methods dialog box will allow you to select root methods in that class.

Notes:

For more, see the following NetBeans FAQ:

See Also
Analyzing Application Performance

Legal Notices