Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): fix sync benchmark report for tpch #10283

Merged
merged 1 commit into from
Mar 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions .github/workflows/trusted-benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,23 +54,18 @@ jobs:
run: |
aws s3 sync "${{ env.BENCHMARK_S3_PREFIX }}/release/hits/latest/" ./results/hits/
aws s3 sync "${{ env.BENCHMARK_S3_PREFIX }}/release/tpch/latest/" ./results/tpch/
- name: Generate hits report
- name: Generate clickbench report
working-directory: benchmark/clickbench
env:
BENCHMARK_DATASET: "hits"
run: |
./update-results.sh
- name: Generate tpch report
working-directory: benchmark/clickbench
env:
BENCHMARK_DATASET: "tpch"
run: |
./update-results.sh
./update-results.sh hits
./update-results.sh tpch
- name: Upload PR clickbench report to repo.databend.rs
working-directory: benchmark/clickbench
run: |
aws s3 cp ./results/hits.html ${{ env.REPORT_S3_PREFIX }}/hits.html
aws s3 cp ./results/hits.html ${{ env.REPORT_S3_PREFIX }}/tpch.html
aws s3 cp ./results/tpch.html ${{ env.REPORT_S3_PREFIX }}/tpch.html
- name: Comment on PR
uses: everpcpc/comment-on-pr-action@v1
with:
Expand Down
15 changes: 10 additions & 5 deletions benchmark/clickbench/update-results.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@

# from: https://github.com/ClickHouse/ClickBench/blob/main/generate-results.sh

BENCHMARK_DATASET=${BENCHMARK_DATASET:-hits}
dataset=$1

if [ -z "$dataset" ]; then
echo "Usage: $0 <dataset>"
exit 1
fi

(
sed '/^[ \t]*const data = \[$/q' "${BENCHMARK_DATASET}/index.html"
sed '/^[ \t]*const data = \[$/q' "${dataset}/index.html"

FIRST=1
find "./results/${BENCHMARK_DATASET}/" -name '*.json' | while read -r file; do
find "./results/${dataset}/" -name '*.json' | while read -r file; do
[[ $file =~ ^(hardware|versions)/ ]] && continue

[ "${FIRST}" = "0" ] && echo -n ','
Expand All @@ -17,6 +22,6 @@ BENCHMARK_DATASET=${BENCHMARK_DATASET:-hits}
done

echo ']; // end of data'
sed '0,/^[ \t]*\]; \/\/ end of data$/d' "${BENCHMARK_DATASET}/index.html"
sed '0,/^[ \t]*\]; \/\/ end of data$/d' "${dataset}/index.html"

) >"results/${BENCHMARK_DATASET}.html"
) >"results/${dataset}.html"