Skip to content

Commit

Permalink
Run bench once a day, no scheduled on forks, store commit id (#992)
Browse files Browse the repository at this point in the history
Signed-off-by: Vlad Volodkin <[email protected]>
Co-authored-by: Vlad Volodkin <[email protected]>
  • Loading branch information
vladem and Vlad Volodkin authored Aug 30, 2024
1 parent fd0bc1a commit 0f04ea4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/actions/scripts/save-benchmark-results.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ set -e

aws --version || (curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && unzip awscliv2.zip && sudo ./aws/install)

echo "{\"commit\": {\"id\": \"${COMMIT_ID}\"}, \"benches\": $(cat results/output.json)}" > results/s3_output.json
DATE=$(date +%s)
echo "Storing benchmark results as ${S3_BENCH_RESULTS_PREFIX}/${DATE}.json"
aws s3 cp \
--region ${S3_BENCH_REGION} \
results/output.json \
s3://${S3_BENCH_BUCKET_NAME}/${S3_BENCH_RESULTS_PREFIX}/${DATE}.json \
> /dev/null 2>&1
results/s3_output.json \
s3://${S3_BENCH_BUCKET_NAME}/${S3_BENCH_RESULTS_PREFIX}/${DATE}.json
5 changes: 4 additions & 1 deletion .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ jobs:
S3_BENCH_REGION: ${{ vars.S3_BENCH_REGION }}
S3_BENCH_BUCKET_NAME: ${{ vars.S3_BENCH_RESULTS_BUCKET_NAME }}
S3_BENCH_RESULTS_PREFIX: ${{ inputs.s3_bench_results_prefix }}/${{ github.job }}
COMMIT_ID: ${{ inputs.ref }}

latency-bench:
name: Benchmark (Latency)
Expand Down Expand Up @@ -130,6 +131,7 @@ jobs:
S3_BENCH_REGION: ${{ vars.S3_BENCH_REGION }}
S3_BENCH_BUCKET_NAME: ${{ vars.S3_BENCH_RESULTS_BUCKET_NAME }}
S3_BENCH_RESULTS_PREFIX: ${{ inputs.s3_bench_results_prefix }}/${{ github.job }}
COMMIT_ID: ${{ inputs.ref }}

cache-bench:
name: Benchmark (Cache)
Expand Down Expand Up @@ -184,4 +186,5 @@ jobs:
env:
S3_BENCH_REGION: ${{ vars.S3_BENCH_REGION }}
S3_BENCH_BUCKET_NAME: ${{ vars.S3_BENCH_RESULTS_BUCKET_NAME }}
S3_BENCH_RESULTS_PREFIX: ${{ inputs.s3_bench_results_prefix }}/${{ github.job }}
S3_BENCH_RESULTS_PREFIX: ${{ inputs.s3_bench_results_prefix }}/${{ github.job }}
COMMIT_ID: ${{ inputs.ref }}
8 changes: 5 additions & 3 deletions .github/workflows/bench_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [ "main", "wf-changes/**" ]
schedule:
- cron: "0 */8 * * *" # every 8 hours
- cron: "0 2 * * *" # Daily at 02:00 UTC

permissions:
id-token: write
Expand All @@ -14,14 +14,16 @@ jobs:
integration:
name: Benchmarks
uses: ./.github/workflows/bench.yml
if: github.event_name != 'schedule' || github.repository == 'awslabs/mountpoint-s3'
with:
ref: ${{ github.event.after }}
ref: ${{ github.sha }}
publish: ${{ github.event.ref == 'refs/heads/main' }}
s3_bench_results_prefix: ${{ github.event_name == 'schedule' && 'results/main/s3_standard' || null }}
s3express-integration:
name: Benchmarks (s3express)
uses: ./.github/workflows/bench_s3express.yml
if: github.event_name != 'schedule' || github.repository == 'awslabs/mountpoint-s3'
with:
ref: ${{ github.event.after }}
ref: ${{ github.sha }}
publish: ${{ github.event.ref == 'refs/heads/main' }}
s3_bench_results_prefix: ${{ github.event_name == 'schedule' && 'results/main/s3_express' || null }}
2 changes: 2 additions & 0 deletions .github/workflows/bench_s3express.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ jobs:
S3_BENCH_REGION: ${{ vars.S3_BENCH_REGION }}
S3_BENCH_BUCKET_NAME: ${{ vars.S3_BENCH_RESULTS_BUCKET_NAME }}
S3_BENCH_RESULTS_PREFIX: ${{ inputs.s3_bench_results_prefix }}/${{ github.job }}
COMMIT_ID: ${{ inputs.ref }}

latency-bench:
name: Benchmark (Latency)
Expand Down Expand Up @@ -131,3 +132,4 @@ jobs:
S3_BENCH_REGION: ${{ vars.S3_BENCH_REGION }}
S3_BENCH_BUCKET_NAME: ${{ vars.S3_BENCH_RESULTS_BUCKET_NAME }}
S3_BENCH_RESULTS_PREFIX: ${{ inputs.s3_bench_results_prefix }}/${{ github.job }}
COMMIT_ID: ${{ inputs.ref }}

0 comments on commit 0f04ea4

Please sign in to comment.