Defining Partitions

To have partitioned statistics, your application must have resources.

Partitions are a stat-mapping schema, and the SSID has a stat-mapping component instead of a stat component. Partitions are named in a partitions element within an aggregations or instance-metadata element in the metadata file, as shown in the following example:

"$schema": "//:stat-mapping",
"id": "//:class.app/util2//:stat-mapping.errors",
"instance-metadata": {
    "partitions": [
        "inst"
    ]
},
"transforms": [
    {
        "match": "//:class.app/util2//:res.inst/(inst[1-2])//:stat.errors$",
        "replace": "//:class.app/util2//:stat.errors//:part.inst(\\1)"
    }
]

In the transforms section, each match represents a statistic that is already defined in the class and stat metadata, and the paired replace maps that statistic to one of the partitions named in the partitions element. The value of the partitioned statistic is equal to the sum of the values of the matching statistics for each resource.

See Separating Data Into Partitions for an example. See also the "Statistic Mapping" section in the ssid-metadata(7) man page.