Skip to content

Commit

Permalink
metrics: Use jq tool to pretty-print json metrics output
Browse files Browse the repository at this point in the history
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 8c498ef)
  • Loading branch information
dborquez authored and fidencio committed Oct 6, 2023
1 parent 1f9a4e9 commit 16e31dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/metrics/lib/json.bash
Expand Up @@ -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.
Expand Down

0 comments on commit 16e31dd

Please sign in to comment.