Skip to content

Commit

Permalink
action: benchmark more images on schedule
Browse files Browse the repository at this point in the history
Signed-off-by: Yadong Ding <ding_yadong@foxmail.com>
  • Loading branch information
Desiki-high committed May 12, 2023
1 parent 722d33f commit 0637c7b
Showing 1 changed file with 143 additions and 41 deletions.
184 changes: 143 additions & 41 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ on:

env:
CARGO_TERM_COLOR: always
IMAGE: wordpress
TAG: 6.1.1

jobs:
contrib-build:
Expand Down Expand Up @@ -69,6 +67,15 @@ jobs:
benchmark-oci:
runs-on: ubuntu-latest
needs: [contrib-build, nydus-build]
strategy:
matrix:
image:
- wordpress-6.1.1
- node-19.8
- python-3.10.7
- golang-1.19.3
- ruby-3.1.3
- amazoncorretto-8-al2022-jdk
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -84,22 +91,33 @@ jobs:
path: contrib/nydusify/cmd
- name: Prepare OCI Environment
run: |
IMAGE=$(echo "${{ matrix.image }}" | sed 's/-/:/')
sudo bash misc/benchmark/prepare_env.sh oci
sudo docker pull ${{env.IMAGE}}:${{env.TAG}} && docker tag ${{env.IMAGE}}:${{env.TAG}} localhost:5000/${{env.IMAGE}}:${{env.TAG}}
sudo docker push localhost:5000/${{env.IMAGE}}:${{env.TAG}}
sudo docker pull $IMAGE && docker tag $IMAGE localhost:5000/$IMAGE
sudo docker push localhost:5000/$IMAGE
- name: BenchMark Test
run: |
IMAGE=$(echo "${{ matrix.image }}" | sed 's/-/:/')
cd misc/benchmark
sudo python3 benchmark.py --mode oci --image ${{env.IMAGE}}:${{env.TAG}}
sudo python3 benchmark.py --mode oci --image $IMAGE
- name: Save Test Result
uses: actions/upload-artifact@v3
with:
name: benchmark-oci
path: misc/benchmark/${{env.IMAGE}}.csv
name: benchmark-oci-${{ matrix.image }}
path: misc/benchmark/*.csv

benchmark-nydus-no-prefetch:
runs-on: ubuntu-latest
needs: [contrib-build, nydus-build]
strategy:
matrix:
image:
- wordpress-6.1.1
- node-19.8
- python-3.10.7
- golang-1.19.3
- ruby-3.1.3
- amazoncorretto-8-al2022-jdk
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -115,24 +133,35 @@ jobs:
path: contrib/nydusify/cmd
- name: Prepare Nydus Environment
run: |
IMAGE=$(echo "${{ matrix.image }}" | sed 's/-/:/')
sudo bash misc/benchmark/prepare_env.sh nydus
sudo DOCKER_CONFIG=$HOME/.docker nydusify convert \
--source ${{env.IMAGE}}:${{env.TAG}} \
--target localhost:5000/${{env.IMAGE}}:${{env.TAG}}_nydus \
--source $IMAGE \
--target localhost:5000/${IMAGE}_nydus \
--fs-version 6
- name: BenchMark Test
run: |
IMAGE=$(echo "${{ matrix.image }}" | sed 's/-/:/')
cd misc/benchmark
sudo python3 benchmark.py --mode nydus-no-prefetch --image ${{env.IMAGE}}:${{env.TAG}}
sudo python3 benchmark.py --mode nydus-no-prefetch --image $IMAGE
- name: Save Test Result
uses: actions/upload-artifact@v3
with:
name: benchmark-nydus-no-prefetch
path: misc/benchmark/${{env.IMAGE}}.csv
name: benchmark-nydus-no-prefetch-${{matrix.image}}
path: misc/benchmark/*.csv

benchmark-zran-no-prefetch:
runs-on: ubuntu-latest
needs: [contrib-build, nydus-build]
strategy:
matrix:
image:
- wordpress-6.1.1
- node-19.8
- python-3.10.7
- golang-1.19.3
- ruby-3.1.3
- amazoncorretto-8-al2022-jdk
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -148,27 +177,38 @@ jobs:
path: contrib/nydusify/cmd
- name: Prepare Nydus Environment
run: |
IMAGE=$(echo "${{ matrix.image }}" | sed 's/-/:/')
sudo bash misc/benchmark/prepare_env.sh nydus
sudo docker pull ${{env.IMAGE}}:${{env.TAG}} && docker tag ${{env.IMAGE}}:${{env.TAG}} localhost:5000/${{env.IMAGE}}:${{env.TAG}}
sudo docker push localhost:5000/${{env.IMAGE}}:${{env.TAG}}
sudo docker pull $IMAGE && docker tag $IMAGE localhost:5000/$IMAGE
sudo docker push localhost:5000/$IMAGE
sudo DOCKER_CONFIG=$HOME/.docker nydusify convert \
--source localhost:5000/${{env.IMAGE}}:${{env.TAG}} \
--target localhost:5000/${{env.IMAGE}}:${{env.TAG}}_nydus \
--source localhost:5000/$IMAGE \
--target localhost:5000/${IMAGE}_nydus \
--fs-version 6 \
--oci-ref
- name: BenchMark Test
run: |
IMAGE=$(echo "${{ matrix.image }}" | sed 's/-/:/')
cd misc/benchmark
sudo python3 benchmark.py --mode nydus-no-prefetch --image ${{env.IMAGE}}:${{env.TAG}}
sudo python3 benchmark.py --mode nydus-no-prefetch --image $IMAGE
- name: Save Test Result
uses: actions/upload-artifact@v3
with:
name: benchmark-zran-no-prefetch
path: misc/benchmark/${{env.IMAGE}}.csv
name: benchmark-zran-no-prefetch-${{matrix.image}}
path: misc/benchmark/*.csv

benchmark-nydus-all-prefetch:
runs-on: ubuntu-latest
needs: [contrib-build, nydus-build]
strategy:
matrix:
image:
- wordpress-6.1.1
- node-19.8
- python-3.10.7
- golang-1.19.3
- ruby-3.1.3
- amazoncorretto-8-al2022-jdk
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -184,24 +224,35 @@ jobs:
path: contrib/nydusify/cmd
- name: Prepare Nydus Environment
run: |
IMAGE=$(echo "${{ matrix.image }}" | sed 's/-/:/')
sudo bash misc/benchmark/prepare_env.sh nydus
sudo DOCKER_CONFIG=$HOME/.docker nydusify convert \
--source ${{env.IMAGE}}:${{env.TAG}} \
--target localhost:5000/${{env.IMAGE}}:${{env.TAG}}_nydus \
--source $IMAGE \
--target localhost:5000/${IMAGE}_nydus \
--fs-version 6
- name: BenchMark Test
run: |
IMAGE=$(echo "${{ matrix.image }}" | sed 's/-/:/')
cd misc/benchmark
sudo python3 benchmark.py --mode nydus-all-prefetch --image ${{env.IMAGE}}:${{env.TAG}}
sudo python3 benchmark.py --mode nydus-all-prefetch --image $IMAGE
- name: Save Test Result
uses: actions/upload-artifact@v3
with:
name: benchmark-nydus-all-prefetch
path: misc/benchmark/${{env.IMAGE}}.csv
name: benchmark-nydus-all-prefetch-${{matrix.image}}
path: misc/benchmark/*.csv

benchmark-zran-all-prefetch:
runs-on: ubuntu-latest
needs: [contrib-build, nydus-build]
strategy:
matrix:
image:
- wordpress-6.1.1
- node-19.8
- python-3.10.7
- golang-1.19.3
- ruby-3.1.3
- amazoncorretto-8-al2022-jdk
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -217,27 +268,38 @@ jobs:
path: contrib/nydusify/cmd
- name: Prepare Nydus Environment
run: |
IMAGE=$(echo "${{ matrix.image }}" | sed 's/-/:/')
sudo bash misc/benchmark/prepare_env.sh nydus
sudo docker pull ${{env.IMAGE}}:${{env.TAG}} && docker tag ${{env.IMAGE}}:${{env.TAG}} localhost:5000/${{env.IMAGE}}:${{env.TAG}}
sudo docker push localhost:5000/${{env.IMAGE}}:${{env.TAG}}
sudo docker pull $IMAGE && docker tag $IMAGE localhost:5000/$IMAGE
sudo docker push localhost:5000/$IMAGE
sudo DOCKER_CONFIG=$HOME/.docker nydusify convert \
--source localhost:5000/${{env.IMAGE}}:${{env.TAG}} \
--target localhost:5000/${{env.IMAGE}}:${{env.TAG}}_nydus \
--source localhost:5000/$IMAGE \
--target localhost:5000/${IMAGE}_nydus \
--fs-version 6 \
--oci-ref
- name: BenchMark Test
run: |
IMAGE=$(echo "${{ matrix.image }}" | sed 's/-/:/')
cd misc/benchmark
sudo python3 benchmark.py --mode nydus-all-prefetch --image ${{env.IMAGE}}:${{env.TAG}}
sudo python3 benchmark.py --mode nydus-all-prefetch --image $IMAGE
- name: Save Test Result
uses: actions/upload-artifact@v3
with:
name: benchmark-zran-all-prefetch
path: misc/benchmark/${{env.IMAGE}}.csv
name: benchmark-zran-all-prefetch-${{matrix.image}}
path: misc/benchmark/*.csv

benchmark-nydus-filelist-prefetch:
runs-on: ubuntu-latest
needs: [contrib-build, nydus-build]
strategy:
matrix:
image:
- wordpress-6.1.1
- node-19.8
- python-3.10.7
- golang-1.19.3
- ruby-3.1.3
- amazoncorretto-8-al2022-jdk
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -253,24 +315,35 @@ jobs:
path: contrib/nydusify/cmd
- name: Prepare Nydus Environment
run: |
IMAGE=$(echo "${{ matrix.image }}" | sed 's/-/:/')
sudo bash misc/benchmark/prepare_env.sh nydus
sudo DOCKER_CONFIG=$HOME/.docker nydusify convert \
--source ${{env.IMAGE}}:${{env.TAG}} \
--target localhost:5000/${{env.IMAGE}}:${{env.TAG}}_nydus \
--source $IMAGE \
--target localhost:5000/${IMAGE}_nydus \
--fs-version 6
- name: BenchMark Test
run: |
IMAGE=$(echo "${{ matrix.image }}" | sed 's/-/:/')
cd misc/benchmark
sudo python3 benchmark.py --mode nydus-filelist-prefetch --image ${{env.IMAGE}}:${{env.TAG}}
sudo python3 benchmark.py --mode nydus-filelist-prefetch --image $IMAGE
- name: Save Test Result
uses: actions/upload-artifact@v3
with:
name: benchmark-nydus-filelist-prefetch
path: misc/benchmark/${{env.IMAGE}}.csv
name: benchmark-nydus-filelist-prefetch-${{matrix.image}}
path: misc/benchmark/*.csv

benchmark-result:
runs-on: ubuntu-latest
needs: [benchmark-oci, benchmark-zran-all-prefetch, benchmark-zran-no-prefetch, benchmark-nydus-no-prefetch, benchmark-nydus-all-prefetch, benchmark-nydus-filelist-prefetch]
strategy:
matrix:
image:
- wordpress-6.1.1
- node-19.8
- python-3.10.7
- golang-1.19.3
- ruby-3.1.3
- amazoncorretto-8-al2022-jdk
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -283,13 +356,42 @@ jobs:
uses: actions/cache/restore@v3
with:
path: benchmark-result
key: benchmark-${{ steps.get-date.outputs.date }}
key: benchmark-${{matrix.image}}-${{ steps.get-date.outputs.date }}
restore-keys: |
benchmark-
- uses: actions/download-artifact@v3
benchmark-${{matrix.image}}
- name: Download benchmark-oci
uses: actions/download-artifact@v3
with:
name: benchmark-oci-${{matrix.image}}
path: benchmark-oci
- name: Download benchmark-nydus-no-prefetch
uses: actions/download-artifact@v3
with:
name: benchmark-nydus-no-prefetch-${{matrix.image}}
path: benchmark-nydus-no-prefetch
- name: Download benchmark-zran-no-prefetch
uses: actions/download-artifact@v3
with:
name: benchmark-zran-no-prefetch-${{matrix.image}}
path: benchmark-zran-no-prefetch
- name: Download benchmark-nydus-all-prefetch
uses: actions/download-artifact@v3
with:
name: benchmark-nydus-all-prefetch-${{matrix.image}}
path: benchmark-nydus-all-prefetch
- name: Download benchmark-zran-all-prefetch
uses: actions/download-artifact@v3
with:
name: benchmark-zran-all-prefetch-${{matrix.image}}
path: benchmark-zran-all-prefetch
- name: Download benchmark-nydus-filelist-prefetch
uses: actions/download-artifact@v3
with:
name: benchmark-nydus-filelist-prefetch-${{matrix.image}}
path: benchmark-nydus-filelist-prefetch
- uses: geekyeggo/delete-artifact@v2
with:
name: '*'
name: "*-${{matrix.image}}"
- name: Benchmark
run: |
if [ ! -d "benchmark-result" ]; then
Expand All @@ -300,4 +402,4 @@ jobs:
uses: actions/cache/save@v3
with:
path: benchmark-result
key: benchmark-${{ steps.get-date.outputs.date }}
key: benchmark-${{matrix.image}}-${{ steps.get-date.outputs.date }}

0 comments on commit 0637c7b

Please sign in to comment.