File tree 4 files changed +62
-0
lines changed
4 files changed +62
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Benchmark Test
2
+
3
+ on :
4
+ pull_request :
5
+ branches :
6
+ - main
7
+
8
+ jobs :
9
+ benchmark :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - name : Checkout code
13
+ uses : actions/checkout@v4
14
+ with :
15
+ fetch-depth : 0
16
+
17
+ - name : Install Go
18
+ uses : actions/setup-go@v5
19
+ with :
20
+ go-version-file : go.mod
21
+
22
+ - name : Install dependencies
23
+ run : |
24
+ go mod download
25
+ go mod tidy
26
+
27
+ - name : Run benchmark
28
+ working-directory : test/e2e
29
+ run : |
30
+ pwd
31
+ ls -la
32
+ go version
33
+ go clean -testcache
34
+ go test -v -run=^$ -bench=. -benchmem -count=10
35
+
36
+ - name : Compare with baseline
37
+ run : |
38
+ go install golang.org/x/perf/cmd/benchstat@latest
39
+ benchstat benchmarks/baseline.txt new.txt
40
+
Original file line number Diff line number Diff line change
1
+ goos: darwin
2
+ goarch: arm64
3
+ pkg: github.com/operator-framework/operator-controller/test/e2e
4
+ cpu: Apple M1 Pro
5
+ BenchmarkCreateClusterCatalog-10 1 1352852042 ns/op 404520 B/op 3914 allocs/op
6
+ BenchmarkCreateClusterCatalog-10 13 86982353 ns/op 36907 B/op 394 allocs/op
7
+ BenchmarkCreateClusterCatalog-10 12 84962496 ns/op 34555 B/op 393 allocs/op
8
+ BenchmarkCreateClusterCatalog-10 18 70375363 ns/op 34880 B/op 388 allocs/op
9
+ BenchmarkCreateClusterCatalog-10 15 71715708 ns/op 37654 B/op 399 allocs/op
10
+ BenchmarkCreateClusterCatalog-10 13 85251170 ns/op 36572 B/op 396 allocs/op
11
+ BenchmarkCreateClusterCatalog-10 13 83413260 ns/op 38435 B/op 393 allocs/op
12
+ BenchmarkCreateClusterCatalog-10 13 93851487 ns/op 37249 B/op 395 allocs/op
13
+ BenchmarkCreateClusterCatalog-10 13 78722212 ns/op 36593 B/op 393 allocs/op
14
+ BenchmarkCreateClusterCatalog-10 13 86393522 ns/op 37404 B/op 395 allocs/op
15
+ PASS
16
+ ok github.com/operator-framework/operator-controller/test/e2e 32.699s
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ require (
54
54
github.com/Microsoft/hcsshim v0.12.9 // indirect
55
55
github.com/VividCortex/ewma v1.2.0 // indirect
56
56
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d // indirect
57
+ github.com/aclements/go-moremath v0.0.0-20210112150236-f10218a38794 // indirect
57
58
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
58
59
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
59
60
github.com/beorn7/perks v1.0.1 // indirect
@@ -227,6 +228,7 @@ require (
227
228
golang.org/x/crypto v0.32.0 // indirect
228
229
golang.org/x/net v0.34.0 // indirect
229
230
golang.org/x/oauth2 v0.25.0 // indirect
231
+ golang.org/x/perf v0.0.0-20250106172127-400946f43c82 // indirect
230
232
golang.org/x/sync v0.10.0 // indirect
231
233
golang.org/x/sys v0.29.0 // indirect
232
234
golang.org/x/term v0.28.0 // indirect
Original file line number Diff line number Diff line change @@ -50,6 +50,8 @@ github.com/VividCortex/ewma v1.2.0 h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1o
50
50
github.com/VividCortex/ewma v1.2.0 /go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4 =
51
51
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d h1:licZJFw2RwpHMqeKTCYkitsPqHNxTmd4SNR5r94FGM8 =
52
52
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d /go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo =
53
+ github.com/aclements/go-moremath v0.0.0-20210112150236-f10218a38794 h1:xlwdaKcTNVW4PtpQb8aKA4Pjy0CdJHEqvFbAnvR5m2g =
54
+ github.com/aclements/go-moremath v0.0.0-20210112150236-f10218a38794 /go.mod h1:7e+I0LQFUI9AXWxOfsQROs9xPhoJtbsyWcjJqDd4KPY =
53
55
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc /go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc =
54
56
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf /go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0 =
55
57
github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI =
@@ -824,6 +826,8 @@ golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4Iltr
824
826
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 /go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw =
825
827
golang.org/x/oauth2 v0.25.0 h1:CY4y7XT9v0cRI9oupztF8AgiIu99L/ksR/Xp/6jrZ70 =
826
828
golang.org/x/oauth2 v0.25.0 /go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI =
829
+ golang.org/x/perf v0.0.0-20250106172127-400946f43c82 h1:cntvEEbGexov/BId760utCq7Mtu7iJG4lRr/0z+V7Z4 =
830
+ golang.org/x/perf v0.0.0-20250106172127-400946f43c82 /go.mod h1:q/JkMABA9XXpcvcwKP7xYHRk8KsZBPSXrV8tG4DEMGI =
827
831
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f /go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM =
828
832
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f /go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM =
829
833
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 /go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM =
You can’t perform that action at this time.
0 commit comments