Conditions

Use conditions to define an action trigger-based on comparison against a statistic, a log message or a Boolean value. Conditions can be triggered during or after a workload test.

There are four types of conditions:

  • Statistics Comparison. Performs a numerical comparison of a WorkloadWisdom statistic to a user-defined value or another WorkloadWisdom statistic.

  • Match Text in Log. Performs a regular expression (regex) match in the log file produced from each test run.

  • Combination. Combines two or more Conditions together using logic operations AND, OR, or XOR.

  • Script. Executes a custom JavaScript code that results in a Boolean value when executed.

The following default conditions are shipped with WorkloadWisdom:

  • Scenarios or Actions Failed or Aborted

  • Actions Aborted

  • Actions Failed

  • Scenarios Aborted

  • Scenarios Failed

Click +New Condition to define a new condition.

Statistics Comparison

Trigger Parameters

Specify the “when” and “where” to apply the Condition to.

  • Trigger on. Specify the Logical Ports to apply the Condition to in a selected test bed. You can specify the Condition to trigger on all Logical Ports (All), a specific Logical Port, all Client side Logical Ports (Client total), all Server side Logical Ports (Server total), any Client side Logical Port (Client any), any Server side Logical Port (Server any), or any Logical Port (Any, which is the default).

  • From ___ to ___ percent/seconds of test time. Specify when the Condition can be triggered during a test run. For example:

    • 0 to 100 percent: the Condition can be triggered at any time during the test run.

    • 25 to 75 percent: the Condition can be triggered after 25% of the total test duration from the beginning of the test run, and before 75% of the total test duration from the beginning of the test run.

    • 30 to 45 seconds: the Condition can be triggered after 30 seconds from the beginning of the test run, and before 45 seconds from the beginning of the test run.

  • After triggering, wait ___ seconds before checking again. Specify a “grace period” after a Condition is triggered before the same Condition can be triggered again. For example, if you have a Condition that is triggered when Average Response Time is above 30ms, and you specify a wait time of 5 seconds, then the earliest the Condition can be triggered for a second time is 5 seconds after the first time the same Condition is triggered, regardless of the observed Average Response Time during that wait time interval, provided that the observation time is within the from ___ to ___ range.

Condition

Specify the statistics that will be compared when this condition is applied.

Two types of Statistics Comparison are supported:

  • Static. Compares a selected statistic to a statically defined value. Use this option if you have a fixed “red line” that is triggered when the selected statistic crosses the red line.

For example, if you want to confirm that the average response time for SMB2 READ is greater than 30ms, give it a meaningful name and then specify the following:

2019-11-15_13-48-56.png
  • Statistic. Compares a selected statistic to another selected statistic. Use this option if you have a moving “red line” that is relative to another statistic that is triggered when the selected statistic crosses the red line.

For example, if you want to know when Average Response Time for SMB2 READ is greater than the Average Response Time for SMB2 WRITE, specify the following:

2019-11-15_13-50-16.png

Match Text in Log

This condition type is for advanced users who are very familiar with the test run log file that is produced by Workload Generators.

Trigger Parameters

The test run log is produced once only after the test run completes. No option is available for trigger parameters when you define a match text in log condition.

Condition

Specify a text string match expression using regular expressions. For example, if you want a condition to be triggered when the log reports “insufficient license”, then specify the following:

2019-11-15_13-51-40.png

There are many websites and articles available on the internet today that provide tutorials and guides to writing regular expressions. For help on regular expressions it’s recommended that you search for the term regular expression tutorial.

Combination

Trigger Parameter

See Conditions & Actions for information regarding the statistics comparison condition.

Condition

Use the combination condition to take two or more existing conditions, and join them together using the three logic operations: AND, OR, XOR.

The condition is triggered if the output of the logic operation is True.

Script

Trigger Parameters

See Conditions & Actions for information regarding the statistics comparison condition.

Condition

Use the Script Condition to enter a custom JavaScript code, and the Condition is triggered if the output is True.

For example:

This JavaScript fragment monitors the statistic load.scenarios.attempted.value > 0 is True or False.

(function() {

if (load.scenarios.attempted.value > 0)

{a = true;}

return a;

})()