]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
tools/rados: Remove plain text snippets from rados bench JSON output 66936/head
authorJacques Heunis <jheunis@bloomberg.net>
Thu, 15 Jan 2026 12:11:11 +0000 (12:11 +0000)
committerPatrick Donnelly <pdonnell@ibm.com>
Fri, 29 May 2026 14:53:22 +0000 (10:53 -0400)
commitf3b68e375f1e5d74baf4f890c4271dd52c8cc9b8
tree7c19d1ab6379584b93ab5a525fc6f3fcd9dfcf84
parent4b5d6933fe41dcc9375c4f0a3335990f7b03081a
tools/rados: Remove plain text snippets from rados bench JSON output

`rados bench` emits performance stats as its output. It is very helpful
for this output to be in a machine-readable format and the CLI provides
the `--format=json` flag to achieve this.

There are some logs that do not respect the formatter flag though, as
they provide status updates as the tool is running and do not form part
of the output dataset. This prevents the contents of stdout from being
valid JSON which destroys the machine-readability of the output.

To resolve this we gate those status messages behind a check for the
formatter. If any specific formatter is provided we do not emit the
status logs. This leaves the plaintext output largely untouched while
helping the machine-readable output to be well-formed.

Fixes: https://tracker.ceph.com/issues/74370
Signed-off-by: Jacques Heunis <jheunis@bloomberg.net>
src/common/obj_bencher.cc
src/tools/rados/rados.cc