diff --git a/.github/scripts/command/load_dump_bench.sh b/.github/scripts/command/load_dump_bench.sh index 983bb81acbe8..5f0c7bcdd0ae 100755 --- a/.github/scripts/command/load_dump_bench.sh +++ b/.github/scripts/command/load_dump_bench.sh @@ -22,14 +22,14 @@ test_load_dump_with_small_dir(){ end=`date +%s` runtime=$((end-start)) version=$(./juicefs -V|cut -b 17- | sed 's/:/-/g') - .github/scripts/save_benchmark.sh --category load_dump --name load_small_dir --result $runtime --meta $META --storage file + .github/scripts/save_benchmark.sh --name load_small_dir --result $runtime --meta $META --storage file echo "load cost $runtime seconds" start=`date +%s` ./juicefs dump $META_URL dump.json --fast end=`date +%s` runtime=$((end-start)) echo "dump cost $runtime seconds" - .github/scripts/save_benchmark.sh --category load_dump --name dump_small_dir --result $runtime --meta $META --storage file + .github/scripts/save_benchmark.sh --name dump_small_dir --result $runtime --meta $META --storage file ./juicefs mount $META_URL /jfs -d --no-usage-report inode=$(df -i /jfs | grep JuiceFS |awk -F" " '{print $3}') if [ "$inode" -ne "2233313" ]; then @@ -60,7 +60,7 @@ do_load_dump_with_big_dir(){ runtime=$((end-start)) echo "load cost $runtime seconds" version=$(./juicefs -V|cut -b 17- | sed 's/:/-/g') - .github/scripts/save_benchmark.sh --category load_dump --name load_big_dir --result $runtime --meta $META --storage file + .github/scripts/save_benchmark.sh --name load_big_dir --result $runtime --meta $META --storage file start=`date +%s` if [ "$with_subdir" = true ] ; then ./juicefs dump $META_URL dump.json --subdir test --fast @@ -70,7 +70,7 @@ do_load_dump_with_big_dir(){ end=`date +%s` runtime=$((end-start)) echo "dump cost $runtime seconds" - .github/scripts/save_benchmark.sh --category load_dump --name dump_big_dir --result $runtime --meta $META --storage file + .github/scripts/save_benchmark.sh --name dump_big_dir --result $runtime --meta $META --storage file ./juicefs mount $META_URL /jfs -d --no-usage-report df -i /jfs inode=$(df -i /jfs | grep JuiceFS |awk -F" " '{print $3}') @@ -89,7 +89,7 @@ test_list_with_big_dir(){ runtime=$((end-start)) echo "list cost $runtime seconds" version=$(./juicefs -V|cut -b 17- | sed 's/:/-/g') - .github/scripts/save_benchmark.sh --category list --name list_big_dir --result $runtime --meta $META --storage file + .github/scripts/save_benchmark.sh --name list_big_dir --result $runtime --meta $META --storage file if [ "$file_count" -ne "1000001" ]; then echo ": file_count error: $file_count" exit 1 diff --git a/.github/scripts/fio.sh b/.github/scripts/fio.sh index d87dd9e3c607..948bf3585f14 100755 --- a/.github/scripts/fio.sh +++ b/.github/scripts/fio.sh @@ -101,4 +101,4 @@ echo bandwidth is $bandwidth meta=$(echo $meta_url | awk -F: '{print $1}') echo meta is $meta [[ -z "$meta" ]] && echo "meta is empty" && exit 1 -.github/scripts/save_benchmark.sh --category fio --name $name --result $bandwidth --meta $meta --storage minio \ No newline at end of file +.github/scripts/save_benchmark.sh --name $name --result $bandwidth --meta $meta --storage minio \ No newline at end of file diff --git a/.github/scripts/save_benchmark.sh b/.github/scripts/save_benchmark.sh index 43d701e093db..7c11b04bd2a6 100755 --- a/.github/scripts/save_benchmark.sh +++ b/.github/scripts/save_benchmark.sh @@ -4,10 +4,6 @@ save_benchmark(){ while [[ $# -gt 0 ]]; do key="$1" case $key in - --category) - category="$2" - shift - ;; --name) name="$2" shift @@ -43,7 +39,7 @@ save_benchmark(){ created_date=$(date +"%Y-%m-%d") cat < result.json { - "category": "$category", + "workflow": "$GITHUB_WORKFLOW", "name": "$name", "result": "$result", "meta": "$meta", @@ -59,7 +55,10 @@ save_benchmark(){ } EOF cat result.json - AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY ./juicefs sync --force-update result.json s3://juicefs-ci-aws.s3.us-east-1.amazonaws.com/ci-report/$category/$name/$created_date/$meta-$storage.json + if [[ "$GITHUB_EVENT_NAME" == "schedule" || "$GITHUB_EVENT_NAME" == "workflow_dispatch" ]]; then + echo "save benchmark" + AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY ./juicefs sync --force-update result.json s3://juicefs-ci-aws.s3.us-east-1.amazonaws.com/ci-report/$GITHUB_WORKFLOW/$name/$created_date/$meta-$storage.json + fi } save_benchmark $@ diff --git a/.github/workflows/fio_benchmark.yml b/.github/workflows/fio_benchmark.yml index 7bb1b22be29d..ef95a2807e7f 100644 --- a/.github/workflows/fio_benchmark.yml +++ b/.github/workflows/fio_benchmark.yml @@ -28,9 +28,7 @@ on: jobs: fio_benchmark: timeout-minutes: 30 - if: github.repository == 'juicedata/juicefs' runs-on: [ubuntu-20.04] - strategy: fail-fast: false matrix: diff --git a/.github/workflows/load.yml b/.github/workflows/load.yml index 594346f80f68..fd49332e4026 100644 --- a/.github/workflows/load.yml +++ b/.github/workflows/load.yml @@ -43,7 +43,6 @@ jobs: load: timeout-minutes: 30 - if: github.repository == 'juicedata/juicefs' needs: [build-matrix] strategy: fail-fast: false