Skip to content

Commit 84291d1

Browse files
author
Cory Schwartz
authored
add testground plans to bitswap on CI
- Add a basic testground plan for bitswap - Showcases how to emit regressions stats from a testplan - Add CI plumbing to run testplans on push As a result of this PR, also: - Created the ipfs/go-ipfs-regressions repo, which defines stats structures for the output of testplans and the input to regression analysis and tests
1 parent c0f282f commit 84291d1

File tree

9 files changed

+2017
-0
lines changed

9 files changed

+2017
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Testground PR Checker
3+
4+
on: [push]
5+
6+
jobs:
7+
testground:
8+
runs-on: ubuntu-latest
9+
name: ${{ matrix.composition_file }}
10+
strategy:
11+
matrix:
12+
include:
13+
- backend_addr: ci.testground.ipfs.team
14+
backend_proto: https
15+
plan_directory: testplans/bitswap
16+
composition_file: testplans/bitswap/_compositions/small-k8s.toml
17+
- backend_addr: ci.testground.ipfs.team
18+
backend_proto: https
19+
plan_directory: testplans/bitswap
20+
composition_file: testplans/bitswap/_compositions/medium-k8s.toml
21+
- backend_addr: ci.testground.ipfs.team
22+
backend_proto: https
23+
plan_directory: testplans/bitswap
24+
composition_file: testplans/bitswap/_compositions/large-k8s.toml
25+
steps:
26+
- uses: actions/checkout@v2
27+
- name: testground run
28+
uses: coryschwartz/[email protected]
29+
with:
30+
backend_addr: ${{ matrix.backend_addr }}
31+
backend_proto: ${{ matrix.backend_proto }}
32+
plan_directory: ${{ matrix.plan_directory }}
33+
composition_file: ${{ matrix.composition_file }}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
[metadata]
2+
3+
[global]
4+
plan = "bitswap"
5+
case = "speed-test"
6+
total_instances = 20
7+
builder = "docker:go"
8+
runner = "cluster:k8s"
9+
10+
[global.build_config]
11+
push_registry=true
12+
go_proxy_mode="remote"
13+
go_proxy_url="http://localhost:8081"
14+
registry_type="aws"
15+
16+
[global.run.test_params]
17+
size = "1MB"
18+
count = "1000"
19+
20+
[[groups]]
21+
id = "providers"
22+
instances = { count = 1 }
23+
[groups.resources]
24+
memory = "4096Mi"
25+
cpu = "1000m"
26+
27+
[[groups]]
28+
id = "requestors"
29+
instances = { count = 19 }
30+
[groups.resources]
31+
memory = "4096Mi"
32+
cpu = "1000m"
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[metadata]
2+
name = "bitswap-medium-speed-test"
3+
4+
[global]
5+
plan = "bitswap"
6+
case = "speed-test"
7+
total_instances = 5
8+
builder = "docker:go"
9+
runner = "cluster:k8s"
10+
11+
[global.build_config]
12+
push_registry=true
13+
go_proxy_mode="remote"
14+
go_proxy_url="http://localhost:8081"
15+
registry_type="aws"
16+
17+
[global.run.test_params]
18+
size = "1MB"
19+
count = "1000"
20+
21+
[[groups]]
22+
id = "providers"
23+
instances = { count = 1 }
24+
[groups.resources]
25+
memory = "4096Mi"
26+
cpu = "1000m"
27+
28+
[[groups]]
29+
id = "requestors"
30+
instances = { count = 4 }
31+
[groups.resources]
32+
memory = "4096Mi"
33+
cpu = "1000m"
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
[metadata]
2+
name = "bitswap-local-speed-test"
3+
4+
[global]
5+
plan = "bitswap"
6+
case = "speed-test"
7+
total_instances = 2
8+
builder = "docker:go"
9+
runner = "local:docker"
10+
11+
[global.build_config]
12+
push_registry=false
13+
14+
[global.run.test_params]
15+
size = "1MB"
16+
count = "1000"
17+
18+
[[groups]]
19+
id = "providers"
20+
instances = { count = 1 }
21+
[groups.resources]
22+
memory = "4096Mi"
23+
cpu = "1000m"
24+
25+
[[groups]]
26+
id = "requestors"
27+
instances = { count = 1 }
28+
[groups.resources]
29+
memory = "4096Mi"
30+
cpu = "1000m"
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[metadata]
2+
name = "bitswap-small-speed-test"
3+
4+
[global]
5+
plan = "bitswap"
6+
case = "speed-test"
7+
total_instances = 2
8+
builder = "docker:go"
9+
runner = "cluster:k8s"
10+
11+
[global.build_config]
12+
push_registry=true
13+
go_proxy_mode="remote"
14+
go_proxy_url="http://localhost:8081"
15+
registry_type="aws"
16+
17+
[global.run.test_params]
18+
size = "1MB"
19+
count = "1000"
20+
21+
[[groups]]
22+
id = "providers"
23+
instances = { count = 1 }
24+
[groups.resources]
25+
memory = "4096Mi"
26+
cpu = "1000m"
27+
28+
[[groups]]
29+
id = "requestors"
30+
instances = { count = 1 }
31+
[groups.resources]
32+
memory = "4096Mi"
33+
cpu = "1000m"

testplans/bitswap/go.mod

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
module github.com/ipfs/go-ipfs/testplans/bitswap
2+
3+
require (
4+
github.com/gopherjs/gopherjs v0.0.0-20190812055157-5d271430af9f // indirect
5+
github.com/ipfs/go-bitswap v0.3.4
6+
github.com/ipfs/go-block-format v0.0.3
7+
github.com/ipfs/go-cid v0.0.7
8+
github.com/ipfs/go-datastore v0.4.5
9+
github.com/ipfs/go-ipfs-blockstore v0.1.6
10+
github.com/ipfs/go-ipfs-exchange-interface v0.0.1
11+
github.com/ipfs/go-ipfs-regression v0.0.1
12+
github.com/ipfs/go-ipns v0.1.0 // indirect
13+
github.com/ipfs/go-log/v2 v2.3.0 // indirect
14+
github.com/ipld/go-ipld-prime v0.9.1-0.20210324083106-dc342a9917db // indirect
15+
github.com/libp2p/go-libp2p v0.14.4
16+
github.com/libp2p/go-libp2p-core v0.8.6
17+
github.com/libp2p/go-libp2p-discovery v0.5.1 // indirect
18+
github.com/libp2p/go-libp2p-kad-dht v0.12.2
19+
github.com/libp2p/go-libp2p-peerstore v0.2.8 // indirect
20+
github.com/libp2p/go-libp2p-quic-transport v0.11.2 // indirect
21+
github.com/multiformats/go-multiaddr v0.3.3
22+
github.com/multiformats/go-multihash v0.0.15
23+
github.com/polydawn/refmt v0.0.0-20201211092308-30ac6d18308e // indirect
24+
github.com/smartystreets/assertions v1.0.1 // indirect
25+
github.com/testground/sdk-go v0.2.7
26+
golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 // indirect
27+
)
28+
29+
go 1.15

0 commit comments

Comments
 (0)