RFC Rolling statistics utilities
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 RFC Latest4 patches 0 repliesNew
- v12 patches 3 repliesSuperseded
Changes in v2 from the cover letter
Wired up a qapi type so that the output is done via qapi; it still seems best to have a separate type with the data and the locking etc.
Although that has lost my test harness that was built on my manual formatters.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | RollingStats qapi typeqapi-schema.json | +30 | 0 replies | |
| 2/4 | Rolling statistics utilitiesinclude/ include/ util/ +1 more | +325 | 0 replies | |
| 3/4 | hmp: Add a helper function for printing out a Rolling Statistics sethmp.c | +21 | 0 replies | |
| 4/4 | Example use of rolling statistics in migrationhmp.c include/ migration/ +1 more | +25 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [Qemu-devel] [RFC v2 0/4] Rolling statistics utilities
From: "Dr. David Alan Gilbert" <[email protected]>
Hi,
This is an attempt at a generic rolling statistics utility to
allow data (e.g. bandwidth usage, times etc) to be collected easily. They hold some basic values (min/max/mean/weighted mean)
and the last 'n' raw values. I'd like to use this
maybe with fault-tolerance code and want to read the means within qemu but also want to provide the values to higher levels of the stack and to watch what is going on.
This version is lightly tested, and I'm still more interested
in if it's the right shape/idea rather than a detailed review.
I've included an example use in watching the 'expected downtime'
in migration; rather than the current single value we get:
HMP:
expected downtime stats: Min/Max: 222, 1634 Mean: 983.8 (Weighted:
1005.1253) Count: 141 Values: 1248@39356292, 981@39356395, 774@39356497, 876@39356599, 1040@39356702
QMP:
"expected-downtime-stats": {
"min": 222,
"count": 378,
"mean": 1100.2,
"max": 1942,
"weighted-mean": 1115.710848,
"values": [
{
"tag": 39380740,
"value": 1118
},
{
"tag": 39380842,
"value": 953
},
{
"tag": 39380945,
"value": 1017
},
{
"tag": 39381048,
"value": 1336
},
{
"tag": 39381150,
"value": 1077
}
]
}Dave
RFC v2
Wired up a qapi type so that the output is done via qapi; it still seems best to have a separate type with the data and the locking etc.
Although that has lost my test harness that was built on my manual formatters.
Dr. David Alan Gilbert (4):
RollingStats qapi type
Rolling statistics utilities
hmp: Add a helper function for printing out a Rolling Statistics set Example use of rolling statistics in migration
hmp.c | 24 +++++ include/migration/migration.h | 1 + include/qemu/rolling-stats.h | 87 ++++++++++++++++ include/qemu/typedefs.h | 1 + migration/migration.c | 15 +++ qapi-schema.json | 36 ++++++- util/Makefile.objs | 1 + util/rolling-stats.c | 236 ++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 400 insertions(+), 1 deletion(-) create mode 100644 include/qemu/rolling-stats.h create mode 100644 util/rolling-stats.c
Signature · 1 line
2.1.0