On Tue, Oct 11, 2022 at 05:45:09PM +0300, Denis Plotnikov wrote: > Add "start" & "end" time values to qmp command responses. > > These time values are added to let the qemu management layer get the exact > command execution time without any other time variance which might be brought > by > other parts of management layer or qemu internals. This is particulary useful > for the management layer logging for later problems resolving. > > Example of result: > > ./qemu/scripts/qmp/qmp-shell /tmp/qmp.socket > > (QEMU) query-status > {"end": {"seconds": 1650367305, "microseconds": 831032}, > "start": {"seconds": 1650367305, "microseconds": 831012}, > "return": {"status": "running", "singlestep": false, "running": true}} > > The responce of the qmp command contains the start & end time of > the qmp command processing. > > Suggested-by: Andrey Ryabinin <a...@yandex-team.ru> > Signed-off-by: Denis Plotnikov <den-plotni...@yandex-team.ru> > --- > v0->v1: > - remove interface to control "start" and "end" time values: return > timestamps unconditionally > - add description to qmp specification > - leave the same timestamp format in "seconds", "microseconds" to be > consistent with events > timestamp > - fix patch description > > v1->v2: > - rephrase doc descriptions [Daniel] > - add tests for qmp timestamps to qmp test and qga test [Daniel] > - adjust asserts in test-qmp-cmds according to the new number of returning > keys > > docs/interop/qmp-spec.txt | 28 ++++++++++++++++++++++++++-- > qapi/qmp-dispatch.c | 18 ++++++++++++++++++ > tests/qtest/qmp-test.c | 34 ++++++++++++++++++++++++++++++++++ > tests/unit/test-qga.c | 31 +++++++++++++++++++++++++++++++ > tests/unit/test-qmp-cmds.c | 4 ++-- > 5 files changed, 111 insertions(+), 4 deletions(-)
Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|