qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 11/12] cryptodev: Support query-stats QMP command


From: Daniel P . Berrangé
Subject: Re: [PATCH v5 11/12] cryptodev: Support query-stats QMP command
Date: Wed, 1 Mar 2023 09:13:26 +0000
User-agent: Mutt/2.2.9 (2022-11-12)

On Wed, Mar 01, 2023 at 10:51:23AM +0800, zhenwei pi wrote:
> Now we can use "query-stats" QMP command to query statistics of
> crypto devices. (Originally this was designed to show statistics
> by '{"execute": "query-cryptodev"}'. Daniel Berrangé suggested that
> querying configuration info by "query-cryptodev", and querying
> runtime performance info by "query-stats". This makes sense!)
> 
> Example:
> ~# virsh qemu-monitor-command vm '{"execute": "query-stats", \
>    "arguments": {"target": "cryptodev"} }' | jq
> {
>   "return": [
>     {
>       "provider": "cryptodev",
>       "stats": [
>         {
>           "name": "asym-verify-bytes",
>           "value": 7680
>         },
>         ...
>         {
>           "name": "asym-decrypt-ops",
>           "value": 32
>         },
>         {
>           "name": "asym-encrypt-ops",
>           "value": 48
>         }
>       ],
>       "qom-path": "/objects/cryptodev0" # support asym only
>     },
>     {
>       "provider": "cryptodev",
>       "stats": [
>         {
>           "name": "asym-verify-bytes",
>           "value": 0
>         },
>         ...
>         {
>           "name": "sym-decrypt-bytes",
>           "value": 5376
>         },
>         ...
>       ],
>       "qom-path": "/objects/cryptodev1" # support asym/sym
>     }
>   ],
>   "id": "libvirt-422"
> }
> 
> Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
> Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
> ---
>  backends/cryptodev.c   | 155 +++++++++++++++++++++++++++++++++++++++++
>  qapi/stats.json        |  10 ++-
>  stats/stats-hmp-cmds.c |   5 ++
>  stats/stats-qmp-cmds.c |   2 +
>  4 files changed, 170 insertions(+), 2 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@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 :|




reply via email to

[Prev in Thread] Current Thread [Next in Thread]