IBM Performance Management

Defining basic symbols

Within the <symbolDefinitions> tag, you can define a basic symbol by using the <symbol> tag. For a basic symbol, define an expression that can be evaluated by using other symbols.

Within the <symbol> tag, use the following tags:
<name>
The name of the symbol. It is a string and must start with the $ character.
<eval>
The expression that the agent must evaluate to produce the value for this symbol. For more information about defining expressions, see Defining an expression.
<type>
The type of the value that the symbol returns. Specify this value as a fully qualified Java™ class name, or a Java primitive. Specifying the type for the symbol is optional. If it is not defined, the request mapper attempts to establish the field type based on the expression. If the request mapper is unable to determine the symbol type before it evaluates the expression, performance is affected. Therefore, for best performance, it is better to specify the type.
<args>
The arguments for the symbol. This tag is optional; if it is specified, arguments must be supplied for evaluating the symbol. For more information, see Defining symbol arguments.

Example

<symbol>
   <name>$doubles1</name>
   <eval>$s1*2</eval>
   <type>int</type>
</symbol>

This symbol returns double the value of another symbol, $s1.

Defining symbol arguments

Within the <args> tag of a symbol definition, you can define argument types for the symbol.

In this tag, use the <type> tag to specify the types of arguments. Specify this value as a fully qualified Java class name, or a Java primitive. You can specify any number of <type> tags; each of these tags defines an argument.

In this case, the symbol must be referenced with arguments in parentheses:
$symbol(argument1,argument2...)
The number of arguments must be the same as the number of argument type definitions.

Within the symbol definition, refer to the first argument as $p0, the second argument as $p1, and so on.

A symbol with arguments works like a Java method. It takes input arguments, and returns a value that depends on the values of the arguments.

Example

<symbol>
   <name>$double</name>
   <eval>$p0*2</eval>
   <type>int</type>
   <args>
       <type>int</type>
   </args>
</symbol>
This symbol returns double the value of the argument. To evaluate it, supply a numeric argument: $double(2), $double($s1).