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>
(cherry picked from commit 8c498ef5ee)
This commit is contained in:
David Esparza 2023-10-03 23:33:19 -06:00 committed by Fabiano Fidêncio
parent 1f9a4e908f
commit 16e31dd409

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.