Skip to content

Commit

Permalink
ci: add test for gc with short interval
Browse files Browse the repository at this point in the history
Signed-off-by: Andreea-Lupu <[email protected]>
  • Loading branch information
Andreea-Lupu committed Aug 3, 2023
1 parent 6aed394 commit abbbc31
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/gc-stress-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "GC stress test"
on:
push:
branches:
- main
pull_request:
branches: [main]
release:
types:
- published

permissions: read-all

jobs:
client-tools:
name: GC with short interval
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/clean-runner
- uses: actions/setup-go@v4
with:
cache: false
go-version: 1.20.x

- name: Run zb
run: |
make binary
make bench
./bin/zot-linux-amd64 serve examples/config-gc-bench.json &
sleep 10
bin/zb-linux-amd64 -c 10 -n 100 -o ci-cd http://localhost:8080
killall -r zot-*
# clean zot storage
sudo rm -rf /tmp/zot
17 changes: 17 additions & 0 deletions examples/config-gc-bench.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"distSpecVersion": "1.1.0-dev",
"storage": {
"rootDirectory": "/tmp/zot",
"gc": true,
"gcDelay": "10s",
"gcInterval": "1s"
},
"http": {
"address": "127.0.0.1",
"port": "8080"
},
"log": {
"level": "debug",
"output": "/dev/null"
}
}

0 comments on commit abbbc31

Please sign in to comment.