From: "Dr. David Alan Gilbert" <dgilb...@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilb...@redhat.com> --- hmp.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
diff --git a/hmp.c b/hmp.c index 735097c..20241d8 100644 --- a/hmp.c +++ b/hmp.c @@ -138,6 +138,27 @@ void hmp_info_mice(Monitor *mon, const QDict *qdict) qapi_free_MouseInfoList(mice_list); } +__attribute__ (( unused )) /* Until later in patch series */ +static void monitor_printf_RollingStats(Monitor *mon, const char *title, + RollingStats *r) +{ + RollingStatsValueList *list_entry = r->values; + + monitor_printf(mon, "%s: Min/Max: %.8g, %.8g Mean: %.8g " + "(Weighted: %.8g) Count: %" PRIu64 + " Values: ", + title, r->min, r->max, r->mean, r->weighted_mean, r->count); + + while (list_entry) { + monitor_printf(mon, "%.8g@%" PRIu64 "%s", + list_entry->value->value, + list_entry->value->tag, + list_entry->next ? ", " : ""); + list_entry = list_entry->next; + } + monitor_printf(mon, "\n"); +} + void hmp_info_migrate(Monitor *mon, const QDict *qdict) { MigrationInfo *info; -- 2.1.0