From 80be9e61829fe92730bd8cc784348eef7ec8a114 Mon Sep 17 00:00:00 2001 From: Yadong Ding Date: Thu, 7 Dec 2023 13:12:31 +0800 Subject: [PATCH] action: benchmark add conversion_elapsed Signed-off-by: Yadong Ding --- .github/workflows/benchmark.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 6302cc7cd74..22fef2b3aed 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -318,16 +318,16 @@ jobs: esac cd benchmark-result metric_files=( + "${{ matrix.image }}-oci.json" "${{ matrix.image }}-fsversion-v5.json" "${{ matrix.image }}-fsversion-v6.json" "${{ matrix.image }}-zran.json" - "${{ matrix.image }}-oci.json" ) - echo "| bench-result | e2e-time(s) | read-count | read-amount(MB) | image-size(MB) |" >> $GITHUB_STEP_SUMMARY - echo "|:-------------|:----------:|:----------:|:---------------:|:--------:|" >> $GITHUB_STEP_SUMMARY + echo "| bench-result | e2e-time(s) | read-count | read-amount(MB) | image-size(MB) |convert-time(s)|" >> $GITHUB_STEP_SUMMARY + echo "|:-------------|:-----------:|:----------:|:---------------:|:--------------:|:-------------:|" >> $GITHUB_STEP_SUMMARY for file in "${metric_files[@]}"; do name=$(basename "$file" .json | sed 's/^[^-]*-\(.*\)$/\1/') - data=$(jq -r '. | "\(.e2e_time / 1e9) \(.read_count) \(.read_amount_total / (1024 * 1024)) \(.image_size / (1024 * 1024))"' "$file" | \ - awk '{ printf "%.2f | %.0f | %.2f | %.2f", $1, $2, $3, $4 }') + data=$(jq -r '. | "\(.e2e_time / 1e9) \(.read_count) \(.read_amount_total / (1024 * 1024)) \(.image_size / (1024 * 1024)) \(.conversion_elapsed / 1e9)"' "$file" | \ + awk '{ printf "%.2f | %.0f | %.2f | %.2f | %.2f", $1, $2, $3, $4, $5 }') echo "| $name | $data |" >> $GITHUB_STEP_SUMMARY done