Skip to content

Commit

Permalink
Run benchmark script
Browse files Browse the repository at this point in the history
Signed-off-by: Monthon Klongklaew <monthonk@amazon.com>
  • Loading branch information
monthonk committed Sep 24, 2024
1 parent ad20ead commit 8ef2179
Showing 1 changed file with 52 additions and 13 deletions.
65 changes: 52 additions & 13 deletions .github/workflows/stress_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,21 @@ on:
inputs:
environment:
type: string
publish:
type: boolean
default: false
ref:
required: true
type: string

env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
S3_BUCKET_NAME: ${{ vars.S3_BENCH_BUCKET_NAME }}
S3_REGION: ${{ vars.S3_BENCH_REGION }}
S3_BUCKET_TEST_PREFIX: ${{ vars.S3_BUCKET_BENCH_PREFIX || 'mountpoint-benchmark/' }}
S3_BUCKET_BENCH_FILE: ${{ vars.BENCH_FILE_NAME || 'bench100GB.bin' }}
S3_BUCKET_SMALL_BENCH_FILE: ${{ vars.SMALL_BENCH_FILE_NAME || 'bench5MB.bin' }}
S3_REGION: ${{ vars.S3_BENCH_REGION }}

permissions:
id-token: write
Expand All @@ -28,26 +30,63 @@ permissions:
jobs:
mem-test:
name: Memory stress test
runs-on: [self-hosted, linux, arm64]
runs-on: [self-hosted, linux, x64, nvme-high-performance]

environment: ${{ inputs.environment }}

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
submodules: true
persist-credentials: false
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ vars.ACTIONS_BENCH_IAM_ROLE }}
aws-region: ${{ vars.S3_BENCH_REGION }}
role-duration-seconds: 21600
- name: Set up stable Rust
uses: dtolnay/rust-toolchain@stable
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
submodules: true
persist-credentials: false
- name: Install operating system dependencies
uses: ./.github/actions/install-dependencies
with:
fuseVersion: 2
libunwind: true
fio: true
- name: Run the test
run: ./.github/actions/scripts/stress-test.sh
- name: Set up stable Rust
uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build --release
- name: Run Benchmark
run: mountpoint-s3/scripts/fs_bench.sh
env:
MOUNT_OPTIONAL_ARGS: "--max-memory-target=2048"
- name: Check benchmark results
uses: benchmark-action/github-action-benchmark@v1
with:
tool: 'customBiggerIsBetter'
output-file-path: results/output.json
# This is default value, just make it more explicit
benchmark-data-dir-path: dev/mem_limiter_bench
alert-threshold: "200%"
fail-on-alert: true
# GitHub API token to make a commit comment
github-token: ${{ secrets.GITHUB_TOKEN }}
# Store the results and deploy GitHub pages automatically if the results are from main branch
auto-push: ${{ inputs.publish }}
comment-on-alert: true
max-items-in-chart: 20
- name: Check resource utilization
uses: benchmark-action/github-action-benchmark@v1
with:
tool: 'customSmallerIsBetter'
output-file-path: results/peak_mem_usage.json
benchmark-data-dir-path: dev/mem_limiter_bench/peak_mem_usage
alert-threshold: "200%"
fail-on-alert: false
# GitHub API token to make a commit comment
github-token: ${{ secrets.GITHUB_TOKEN }}
# Store the results and deploy GitHub pages automatically if the results are from main branch
auto-push: ${{ inputs.publish }}
comment-on-alert: true
max-items-in-chart: 20

0 comments on commit 8ef2179

Please sign in to comment.