Creating a probe using the Probekit editor

You can use the visual interface of the Probekit editor to create the source code for a new probe.

To create a probe using the Probekit editor:

  1. Right-click the project that will contain the probe and select New > Other... from the pop-up menu.
  2. In the Select a wizard page, expand Profiling and Logging and select Probekit Source File, then click Next>.
  3. In Enter or select the parent folder, select a project source folder to contain the new probe source file. You can type a folder name in the edit box, or select a folder in the tree pane.
    Note: Probe source files must appear in the top level of a project source folder; they cannot be in a subfolder.
  4. In the File name field, type a name for the new probe source file. The filename extension for probe source files must be .probe.
  5. Click Finish. The new .probe file appears in the project source folder and, by default, automatically opens in the Probekit editor.
  6. Select the Probekit object in the tree pane of the editor, then in the edit pane, enter a unique id string for the probe, and, optionally, a version number. The id string will be used to uniquely identify the probe in the Probekit Registry. For more information, see The Probekit object.
  7. Right-click the Probekit object and select New > Probe from the pop-up menu. The new probe object appears in the tree pane as a child of the Probekit object.
  8. Optionally, in the edit pane of the editor, type the Java™ code that you want to include in the probe's class at class scope. For more information, see The FragmentAtClassScope probe object.
  9. Right-click the probe object in the editor tree and select New > Fragment from the pop-up menu. The new fragment object appears in the tree as a child of the probe object, and the fragment's property fields are displayed in the edit pane.
  10. In the edit pane, select a Fragment Type, then type your Java code for the probe fragment. For more information, see The Fragment probe object.
  11. Continue defining your probe by selecting objects in the tree and using the pop-up menu to add child objects, and typing values for the new objects in the edit pane. For detailed information about the probe objects and their properties, see Probekit element reference. The pop-up menu only lists child objects that are valid for the object that is selected in the tree. Menu items for objects that are valid but can no longer be added, are disabled.
    Note: When you type a value in the Import directive property field of an Import probe object, type only the name of the package or class that you want to import. Do not type the "import" keyword or the trailing semicolon (;).
  12. When you are finished defining your probe, click File > Save. If automatic build is enabled, the new probe is automatically compiled and the resulting files appear in the project.

The Probekit registry lets you select and configure individual probes to be deployed with profiling sets. When a new probe is built, the new probe's information is automatically entered into the Probekit registry.

Parent topic: Working with probes

Related tasks
Modifying a probe using the Probekit editor
Managing your Probekit Registry

Related reference
Probekit Editor
Probekit element reference
Probekit Examples

Terms of use | Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.