Logic Op - Statistics

Overview

The Statistics operation is used to check the difference in statistics counters reported by an application.

The stats.checkpoint operation is designed to be used two or more times in any operations sequence. The first checkpoint establishes a base-line count for an Application’s statistics. The second (or subsequent) checkpoints validate the amount by which statistics have increased since the latest checkpoint for that Application.

Attributes

The operation attributes are as follows.

Attribute Type Description
type String stats.checkpoint
arguments Object [Required] Detailed configuration of the operation behavior.
.application_name String [Required] The name of the n2svcd Application whose statistics we are checking.
tests Array of Object An array of anonymous Objects. Each Object represents a check to be performed. The associated Pass/Fail entries will be generated in the test instance check_log. Refer to the Operation Tests documentation for more information on the syntext for Operation tests.

The following notes apply to the “actual” values in the differences tree which is tested by the test array.

This means that “kpath” dot-separated structure matches the statistics dot-separated name in a natural fashion.

Example

This is an example entry within the operations array:

 {
    "type": "stats.checkpoint",
    "arguments": {
        "application_name": "Logic"
    },
    "tests": [
        { "kpath": "instance.start", "value": "3" },
        { "kpath": "instance.shutdown", "value": "3" },
        { "kpath": "lua.context.create", "value": "1" },
        { "kpath": "lua.context.reuse", "value": "2" }
    ]
  }
}

Note that this assumes that a previous stats.checkpoint had occurred during the test operations list, in order to provide a baseline for comparison.

The "value": "3" thus indicates a test that the “instance.start” statistic has increased by a value of three since the previous statistics checkpoing for the application named Logic.