An optional fourth argument enables you to include additional metadata for the resource. See the sstore_resource_add(3SSTORE) man page for details.
Build the statistics array.
Use the res_ids resource SSID array and the stats structure to dynamically create the ids statistics array. As in previous versions of this example, the ids statistics array is the array that you pass to sstore_data_attach() and use for updating the values of the statistics.