Skip to content

Commit 809adfd

Browse files
committed
Add benchmark workflows
1 parent 73130b2 commit 809adfd

File tree

4 files changed

+52
-9
lines changed

4 files changed

+52
-9
lines changed

.github/workflows/benchmark.yaml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Benchmark
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- pkg/**/*
7+
- cmd/**/*
8+
- test/**/*
9+
- hack/**/*
10+
- kustomize/**/*
11+
- go.mod
12+
- .github/workflows/benchmark.yaml
13+
- '!hack/releases-helm-chart.sh'
14+
push:
15+
paths:
16+
- pkg/**/*
17+
- cmd/**/*
18+
- test/**/*
19+
- hack/**/*
20+
- kustomize/**/*
21+
- go.mod
22+
- .github/workflows/benchmark.yaml
23+
- '!hack/releases-helm-chart.sh'
24+
25+
env:
26+
CGO_ENABLED: "0"
27+
GO_VERSION: "1.23.0"
28+
29+
jobs:
30+
benchmark:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v4
34+
- name: Set up Go
35+
uses: actions/setup-go@v5
36+
with:
37+
go-version: ${{ env.GO_VERSION }}
38+
39+
- name: Test Benchmark
40+
shell: bash
41+
run: |
42+
./hack/e2e-test.sh e2e/kwokctl/benchmark
43+
- name: Upload logs
44+
uses: actions/upload-artifact@v4
45+
if: failure()
46+
with:
47+
name: kwok-logs-benchmark
48+
path: ${{ github.workspace }}/logs

.github/workflows/test.yaml

-6
Original file line numberDiff line numberDiff line change
@@ -270,12 +270,6 @@ jobs:
270270
fi
271271
./hack/e2e-test.sh kwokctl/kwokctl_${{ matrix.kwokctl-runtime }}
272272
273-
- name: Test Benchmark
274-
if: ${{ matrix.os == 'ubuntu-latest' && matrix.kwokctl-runtime == 'binary' }}
275-
shell: bash
276-
run: |
277-
./hack/e2e-test.sh e2e/kwokctl/benchmark
278-
279273
- name: Test Auto Detect
280274
if: ${{ matrix.kwokctl-runtime == 'binary' }}
281275
shell: bash

test/e2e/benchmark.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ func scaleCreateNode(ctx context.Context, t *testing.T, kwokctlPath string, name
120120
func CaseBenchmark(kwokctlPath, clusterName string) *features.FeatureBuilder {
121121
return features.New("Benchmark").
122122
Assess("Create nodes", func(ctx context.Context, t *testing.T, c *envconf.Config) context.Context {
123-
ctx0, cancel := context.WithTimeout(ctx, 120*time.Second)
123+
ctx0, cancel := context.WithTimeout(ctx, 180*time.Second)
124124
defer cancel()
125125

126-
err := scaleCreateNode(ctx0, t, kwokctlPath, clusterName, 2000)
126+
err := scaleCreateNode(ctx0, t, kwokctlPath, clusterName, 5000)
127127
if err != nil {
128128
t.Fatal(err)
129129
}
@@ -133,7 +133,7 @@ func CaseBenchmark(kwokctlPath, clusterName string) *features.FeatureBuilder {
133133
ctx0, cancel := context.WithTimeout(ctx, 240*time.Second)
134134
defer cancel()
135135

136-
err := scaleCreatePod(ctx0, t, kwokctlPath, clusterName, 5000)
136+
err := scaleCreatePod(ctx0, t, kwokctlPath, clusterName, 10000)
137137
if err != nil {
138138
t.Fatal(err)
139139
}

test/e2e/kwokctl/benchmark/main_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ var (
4545
"--runtime=" + runtimeEnv,
4646
"--wait=15m",
4747
"--disable-kube-scheduler",
48+
"--disable-qps-limits",
4849
}
4950
)
5051

0 commit comments

Comments
 (0)