From 1b64627e7335e9f38d66424cdd242b3d0889b060 Mon Sep 17 00:00:00 2001 From: Tony Nguyen Date: Thu, 16 Jan 2020 10:16:16 -0700 Subject: [PATCH] ZFS performance suite should use JSON fio output Making the default FIO output format be JSON thus easier to post process performance results. To get previous 'normal' output format, PERF_FIO_FORMAT can be set prior to invoking zfs-tests.sh. For example: 'PERF_FIO_FORMAT=normal ./zfs-tests.sh -T perf -r ./runfiles/perf.run' Reviewed-by: John Kennedy Reviewed-by: George Melikov Reviewed-by: Brian Behlendorf Signed-off-by: Tony Nguyen Closes #9847 --- tests/zfs-tests/tests/perf/perf.shlib | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/zfs-tests/tests/perf/perf.shlib b/tests/zfs-tests/tests/perf/perf.shlib index 196db24971..78e6140c61 100644 --- a/tests/zfs-tests/tests/perf/perf.shlib +++ b/tests/zfs-tests/tests/perf/perf.shlib @@ -23,6 +23,9 @@ export PERF_RUNTIME_WEEKLY=$((30 * 60)) export PERF_RUNTIME_NIGHTLY=$((10 * 60)) +# Default to JSON for fio output +export PERF_FIO_FORMAT=${PERF_FIO_FORMAT:-'json'} + # Default fs creation options export PERF_FS_OPTS=${PERF_FS_OPTS:-'-o recsize=8k -o compress=lz4' \ ' -o checksum=sha256 -o redundant_metadata=most'} @@ -139,11 +142,13 @@ function do_fio_run_impl # Start the load if [[ $NFS -eq 1 ]]; then log_must ssh -t $NFS_USER@$NFS_CLIENT " - fio --output /tmp/fio.out /tmp/test.fio + fio --output-format=${PERF_FIO_FORMAT} \ + --output /tmp/fio.out /tmp/test.fio " log_must scp $NFS_USER@$NFS_CLIENT:/tmp/fio.out $outfile else - log_must fio --output $outfile $FIO_SCRIPTS/$script + log_must fio --output-format=${PERF_FIO_FORMAT} \ + --output $outfile $FIO_SCRIPTS/$script fi }