*/
# define VIR_DOMAIN_STATS_PERF_EMULATION_FAULTS "perf.emulation_faults"
+
+/**
+ * VIR_DOMAIN_STATS_IOTHREAD_COUNT:
+ *
+ * Maximum number of IOThreads in the subsequent list as unsigned int. Each
+ * IOThread in the list will will use it's iothread_id value as the array
+ * index. There may be fewer array entries than the iothread.count value if
+ * the polling values are not supported.
+ *
+ * Since: 11.2.0
+ */
+# define VIR_DOMAIN_STATS_IOTHREAD_COUNT "iothread.count"
+
+/**
+ * VIR_DOMAIN_STATS_IOTHREAD_PREFIX:
+ *
+ * The parameter name prefix to access each iothread entry. Concatenate the
+ * prefix, the entry number formatted as an unsigned integer and one of the
+ * iothread suffix parameters to form a complete parameter name.
+ *
+ * Since: 11.2.0
+ */
+# define VIR_DOMAIN_STATS_IOTHREAD_PREFIX "iothread."
+
+/**
+ * VIR_DOMAIN_STATS_IOTHREAD_SUFFIX_POLL_MAX_NS:
+ *
+ * Maximum polling time in ns as an unsigned long long. A 0 (zero) means
+ * polling is disabled.
+ *
+ * Since: 11.2.0
+ */
+# define VIR_DOMAIN_STATS_IOTHREAD_SUFFIX_POLL_MAX_NS ".poll-max-ns"
+
+/**
+ * VIR_DOMAIN_STATS_IOTHREAD_SUFFIX_POLL_GROW:
+ *
+ * Polling time factor as an unsigned int or unsigned long long if exceeding
+ * range of unsigned int. A 0 (zero) indicates to allow the underlying
+ * hypervisor to choose how to grow the polling time.
+ *
+ * Since: 11.2.0
+ */
+# define VIR_DOMAIN_STATS_IOTHREAD_SUFFIX_POLL_GROW ".poll-grow"
+
+/**
+ * VIR_DOMAIN_STATS_IOTHREAD_SUFFIX_POLL_SHRINK:
+ *
+ * Polling time divisor as an unsigned int or unsigned long long if exceeding
+ * range of unsigned int. A 0 (zero) indicates to allow the underlying
+ * hypervisor to choose how to shrink the polling time.
+ *
+ * Since: 11.2.0
+ */
+# define VIR_DOMAIN_STATS_IOTHREAD_SUFFIX_POLL_SHRINK ".poll-shrink"
+
/**
* virDomainStatsTypes:
*
* which could quickly exceed poll-max-ns; however, a poll-shrink of
* 10 would cut that polling time more gradually.
*
- * The typed parameter keys are in this format:
- *
- * "iothread.count" - maximum number of IOThreads in the subsequent list
- * as unsigned int. Each IOThread in the list will
- * will use it's iothread_id value as the <id>. There
- * may be fewer <id> entries than the iothread.count
- * value if the polling values are not supported.
- * "iothread.<id>.poll-max-ns" - maximum polling time in ns as an unsigned
- * long long. A 0 (zero) means polling is
- * disabled.
- * "iothread.<id>.poll-grow" - polling time factor as an unsigned int or
- * unsigned long long if exceeding range of
- * unsigned int.
- * A 0 (zero) indicates to allow the underlying
- * hypervisor to choose how to grow the
- * polling time.
- * "iothread.<id>.poll-shrink" - polling time divisor as an unsigned int or
- * unsigned long long if exceeding range of
- * unsigned int.
- * A 0 (zero) indicates to allow the underlying
- * hypervisor to choose how to shrink the
- * polling time.
+ * The VIR_DOMAIN_STATS_IOTHREAD_* constants define the known typed
+ * parameter keys.
*
* VIR_DOMAIN_STATS_MEMORY:
* Return memory bandwidth statistics and the usage information. The typed
if (niothreads == 0)
return;
- virTypedParamListAddUInt(params, niothreads, "iothread.count");
+ virTypedParamListAddUInt(params, niothreads,
+ VIR_DOMAIN_STATS_IOTHREAD_COUNT);
for (i = 0; i < niothreads; i++) {
if (iothreads[i]->poll_valid) {
virTypedParamListAddULLong(params, iothreads[i]->poll_max_ns,
- "iothread.%u.poll-max-ns",
+ VIR_DOMAIN_STATS_IOTHREAD_PREFIX "%u" VIR_DOMAIN_STATS_IOTHREAD_SUFFIX_POLL_MAX_NS,
iothreads[i]->iothread_id);
virTypedParamListAddUnsigned(params, iothreads[i]->poll_grow,
- "iothread.%u.poll-grow",
+ VIR_DOMAIN_STATS_IOTHREAD_PREFIX "%u" VIR_DOMAIN_STATS_IOTHREAD_SUFFIX_POLL_GROW,
iothreads[i]->iothread_id);
virTypedParamListAddUnsigned(params, iothreads[i]->poll_shrink,
- "iothread.%u.poll-shrink",
+ VIR_DOMAIN_STATS_IOTHREAD_PREFIX "%u" VIR_DOMAIN_STATS_IOTHREAD_SUFFIX_POLL_SHRINK,
iothreads[i]->iothread_id);
}
}