metrics: Use jq tool to pretty-print json metrics output

This PR enables the use of jq pretty-print feature to
improve the formatting of metric results json files.

Fixes: #8081

Signed-off-by: David Esparza <david.esparza.borquez@intel.com>
This commit is contained in:
David Esparza 2023-10-03 23:33:19 -06:00
parent a2159a6361
commit 8c498ef5ee
No known key found for this signature in database
GPG Key ID: EABE0B1A98CC3B7A

View File

@ -147,7 +147,7 @@ done)
EOF
)"
echo "$json" > $json_filename
echo "${json}" | jq . > "${json_filename}"
# If we have a JSON URL or host/socket pair set up, post the results there as well.
# Optionally compress into a single line.