Max Inden 0a8dbab87c
feat(perf): continuosly measure on single conn (iperf-style) (#276)
Our current throughput tests open a connection, open a stream,
up- or download 100MB and close the connection. 100 MB is not enough on the
given path (60ms, ~5gbit/s) to exit congestion controller's slow-start. See
https://github.com/libp2p/test-plans/issues/261 for details.

Instead of downloading 100MB multiple times, each on a new connection, establish
a single connection and continuously measure the throughput for a fixed
duration (20s).
2023-10-25 13:24:08 +02:00

24 lines
590 B
Makefile

commitSha := 3a12ea9207e40de20533b0a6aa2e40e3727aa796
all: perf
perf: perf-${commitSha}
docker run --rm --user "$(shell id -u):$(shell id -g)" -v "$(shell pwd)/perf-${commitSha}":/usr/src/myapp -w /usr/src/myapp -e GOCACHE=/usr/src/myapp/.cache golang:1.20 go build -o perf cmd/main.go
cp perf-${commitSha}/perf .
perf-${commitSha}: perf-${commitSha}.zip
unzip -o perf-${commitSha}.zip
perf-${commitSha}.zip:
# TODO: revert
wget -O $@ "https://github.com/mxinden/perf/archive/${commitSha}.zip"
clean:
rm perf-*.zip
rm -rf perf-*
rm perf
rm .cache
rm v0.27
.PHONY: all clean