IxLoad StatQuery Command Configuration
The StatQuery command provides access to the IxLoad L4-7 Protocols statistics and enables you to retrieve the values of specified protocol statistics from those exposed by the application-generated files.
The StatQuery command can be assigned a composite return variable that contains a field for every sought statistics. The field can contain either a list of values, or a single string or numeric value, in case an aggregation function was selected in the StatQuery command that reduces a values list to a single value.
The StatQuery command is capable of retrieving statistics from different categories, whereby some categories enable the filtering by resources, such as chassis ports or traffic items.
For any specified statistic whose values are to be retrieved, the command is limited to retrieving a list of 5000 values. If you wish to access more values, you are advised to use the IxLoad Get Statistics command instead
The StatQuery command provides access to the following statistic categories:
Protocols > NetTraffic: This category contains protocol statistics that can be filtered by NetTraffic resources.
Protocols > Activity: This category contains protocol statistics that can be filtered by Activity resources.
Protocols > Filtering: This category contains protocol statistics filtered by resources that match user-defined filtering Criteria.
Protocols > Chassis: This category contains protocol statistics that can be filtered by Chassis resources.
Protocols > Card: This category contains protocol statistics that can be filtered by Card resources.
Protocols > Port: This category contains protocol statistics that can be filtered by Port resources.
To configure the StatQuery command and specify the sought statistics:
Configure the Command and Options, Global Events pages as you would normally configure any other Execute-type step. Select the Command Settings and Parameters page of the Step Configuration wizard. In the Select Category field, choose a statistic category from the supported categories.Select the Statistics > StatQuery event in the Command String field. In the Select Category field, choose a statistic category from the supported categories.
For all the existing categories (except the L4-7 Protocols > Filtering category), the Filters pane appears as shown in Figure:Filter Pane, with an upper pane for defining a compound filter, and a lower pane for filtering by associated port and traffic item resources.Figure:Filter Pane
Define a new filter by clicking the
button and refine it by adding one or more sub-expressions by proceeding as follows:
Click the Addbutton to add a first filtering expression. Click into the added expression line, select a filter entity from those available for the selected group, define an operator and a value to match. For all portions that make up the expression—entity, operator, and value—you can either use in-place editing or, in case of portions that have multiple values, click the entity to display a drop-down list containing all available values.
Note that the supported filter operators differ based on the currently selected filter entity type.
Add one or more filtering expressions by clicking the Addbutton repeatedly, which adds new expression lines. For each newly added line, define another expression in a similar manner as for a:.
After having defined several such conditions, the resources are filtered using a compound filtering expression composed of the individual expressions joined by an AND operator.
At this moment you can optionally save the defined compound filter for later use by clicking the
button.
Apply the filter by clicking the Applybutton. The lower pane which initially contained all resources (ports and traffic items) for the current category, becomes highlighted green
and displays only resources matching the filtering expression from the upper pane.
From the matching resources shown in the lower pane, you can select only a subset by clicking their associated
controls, which reduces the sought statistics to these associated with the current resource(s). To filter the Resource pane, so as to display only the selected or the unselected resources, click the
button in the upper pane and choose the Show checked or Show unchecked command respectively.
Entering a string in the Find field of the bottom pane enables you to additionally filter the matching resources set. After you have entered a filtering string, you can navigate through the sequence of matching results by clicking the
and
buttons respectively.
Clicking the
button displays all matching resources results using yellow
highlighting.
While working on the filter, if at some moment you wish to clear the entire compound expression and start defining it from scratch, click thebutton.
For the Filtering category, which have no associated resources, the Filters pane appears as shown in Figure:Filter Pane For the Flow Filtering Category. Similar to other categories, the upper pane enables you to define a compound filter expression, while the lower pane displays additional sorting options.Figure:Filter Pane For the Flow Filtering Category
Define a new filter by clicking the
button and refine it by adding one or more sub-expressions by proceeding as follows:
Click the Addbutton to add a first filtering expression. Click into the added expression line, select an entity from those available for the selected group, define an operator and a value to match. For all portions that make up the expression—entity, operator, and value—you can either use in-place editing or, in case of portions that have multiple values, click the entity to display a drop-down list containing all available values.
Note that the supported filter operators differ based on the currently selected filter entity type.
Add one or more filtering expressions by clicking the Addbutton repeatedly, which adds new expression lines. For each newly added line, define another expression in a similar manner as for a:.
After having defined several such conditions, the resources are filtered using a compound filtering expression composed of the individual expressions joined by an AND operator.
At this moment you can optionally save the defined compound filter for later use by clicking the
button.
To enable sorting by an item, click its associated
control. For each item, the sorting order—ascending or descending—can also be set by clicking into the item's line and choosing the desired order (Ascending, Descending) from the drop-down control.
Alternatively to defining a filter from scratch at the previous 5, 6, or 7 steps respectively, you can choose an existing filter to apply by clicking into the Saved filters field and selecting a filter from the drop-down. Click the Select Statisticsbutton to advance to the Statistics pane ( Figure:Statistics Pane ), which enables you to specify the sought statistics for the resources previously filtered.
Initially, the left pane is populated with statistics appropriate to the selected category and filtered according to the filtering expression previously defined in the Filter pane.
Figure:Statistics Pane
![]()
Specify the statistic to be retrieved by selecting it in the left pane and clicking thebutton.
The statistic is added to the right pane and enables you to define its properties, such as an associated caption string or a scale factor.
After several statistics have been selected for retrieval, the statistics list can be re-ordered using theand
buttons.
Since a statistics can be added more than once, provided the associated caption string is different for every occurrence, you could for example add it twice, the second time with a different scale factor.
Configure the remaining pages as you normally would for any other Execute-type step. When clicking the Finish button of the Step Configuration wizard, an expression such as the following is added to the Test Steps table:Statistics StatQuery category="enumValue"
filter="{element1 operator filterString1} {element2
operator filterString2}" resources="NodeId1 NodeId2 NodeId3"
items="{stat {option value} {option value}}"
Example:
The following Composer script is an example of how StatQuery can be used for an existing HTTP test. First, the script will apply the configuration and start the test (using the Config ACTION - startRunSynchronous step) and eventually StatQuery retrieves the "HTTP request sent" statistic into the var1 variable:
Config Action Built-In Event Configuration Action select="/ixload/repository/test[1] " action="startRunSynchronous"
Execute Built-In Event var1 Statistics StatQuery category="Layer4-7 Protocols->Activity" filter="{EXPR: And }" resources="{Traffic1@Network1 - HTTPClient1}" items="{{HTTP Client->HTTP Requests Sent} with caption: {HTTP Requests Sent} aggregation: Sum scale: Multiply 1}"
Config Action Built-In EventConfiguration Action select="/ixload/repository/test[1] " action="waitForTestEnd"
IxLoad TestComposer │ User Guide |