[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [RFC v2 1/4] RollingStats qapi type
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[Qemu-block] [RFC v2 1/4] RollingStats qapi type |
Date: |
Wed, 4 Mar 2015 10:29:36 +0000 |
From: "Dr. David Alan Gilbert" <address@hidden>
This adds a QAPI type that holds the results of statistics collected
by RStats.
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
---
qapi-schema.json | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/qapi-schema.json b/qapi-schema.json
index e16f8eb..9f5cdce 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -353,6 +353,36 @@
{ 'command': 'query-events', 'returns': ['EventInfo'] }
##
+# @RollingStatsValue:
+#
+# A value/tag tuple used in 'RollingStats'
+#
+# @value: An arbitrary measurement value
+#
+# @tag: An arbitrary integer tag value
+#
+##
+{ 'type': 'RollingStatsValue', 'data': {'value': 'number', 'tag': 'uint64'} }
+
+##
+# @RollingStats:
+#
+# A set of statistics that are measured repeatedly.
+#
+# @count: The number of measurements that have contributed to the statistics
+# @min: The minimum value over the measurement period
+# @max: The maximum value over the measurement period
+# @mean: A rolling mean
+# @weighted-mean: A weighted mean (the weight set at startup)
+# @values: A list of the most recent values stored. Note that the
+# stastics above are calculated over the whole set.
+##
+{ 'type': 'RollingStats', 'data': {'count': 'int',
+ 'min': 'number', 'max': 'number',
+ 'mean': 'number', 'weighted-mean': 'number',
+ 'values': ['RollingStatsValue'] } }
+
+##
# @MigrationStats
#
# Detailed migration status.
--
2.1.0