This chapter describes functions used to retrieve and examine statistical information. There are two types of statistics described here: statistics related to store operations and state, and statistics related to parallel scan operations.
For store-related statistics, metrics can be obtained on a per-node or per-operation basis. All statistical information is contained within a structure that you allocate using kv_get_stats(). You release the resources allocated for this structure using kv_release_stats().
In many cases, statistical information is reported for a time
interval. For example, this happens when information is retrieved that
reports on maximum, minimum and average numbers. In this case, the
reporting interval can be restarted by calling kv_get_stats() with
a value of 1
for the clear parameter.
For parallel scan statistics, the statistics are retrieved from a parallel scan iterator using either kv_parallel_scan_get_partition_metrics() or kv_parallel_scan_get_shard_metrics() . This returns a structure that you can examine using a number of different functions. You release this structure using kv_release_detailed_metrics_list() .