remove old benchmark scripts (#3833)

This commit is contained in:
Alessandro Ros 2024-10-05 20:09:34 +02:00 committed by GitHub
parent 4c3ac34425
commit 4b9d3ceb89
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 0 additions and 180 deletions

View File

@ -18,7 +18,6 @@ help:
@echo " test32 run tests on a 32-bit system"
@echo " test-highlevel run high-level tests"
@echo " lint run linters"
@echo " bench NAME=n run bench environment"
@echo " run run app"
@echo " apidocs generate api docs HTML"
@echo " binaries build binaries for all platforms"

View File

@ -1,21 +0,0 @@
ARG BASE_IMAGE
FROM $BASE_IMAGE
RUN apk add --no-cache \
ffmpeg
RUN wget -O /video.mkv http://www.larmoire.info/jellyfish/media/jellyfish-10-mbps-hd-h264.mkv
WORKDIR /s
COPY go.mod go.sum ./
RUN go mod download
COPY . ./
RUN go generate ./...
RUN go build -o /mediamtx .
COPY bench/proxy/start.sh /
RUN chmod +x /start.sh
ENTRYPOINT [ "/start.sh" ]

View File

@ -1,51 +0,0 @@
#!/bin/sh -e
PROXY_COUNT=50
PROXY_PROTOCOL=tcp
#####################################################
# source
CONF=""
CONF="${CONF}rtmp: no\n"
CONF="${CONF}hls: no\n"
CONF="${CONF}webrtc: no\n"
CONF="${CONF}srt: no\n"
CONF="${CONF}rtspAddress: :8555\n"
CONF="${CONF}rtpAddress: :8002\n"
CONF="${CONF}rtcpAddress: :8003\n"
CONF="${CONF}paths:\n"
CONF="${CONF} all_others:\n"
echo -e "$CONF" > /source.conf
/mediamtx /source.conf &
sleep 1
ffmpeg -hide_banner -loglevel error \
-re -stream_loop -1 -i /video.mkv -c copy -f rtsp rtsp://localhost:8555/source &
sleep 1
#####################################################
# proxy
CONF=""
CONF="${CONF}rtmp: no\n"
CONF="${CONF}hls: no\n"
CONF="${CONF}webrtc: no\n"
CONF="${CONF}srt: no\n"
CONF="${CONF}pprof: yes\n"
CONF="${CONF}paths:\n"
for i in $(seq 1 $PROXY_COUNT); do
CONF="${CONF} proxy$i:\n"
CONF="${CONF} source: rtsp://localhost:8555/source\n"
CONF="${CONF} rtspTransport: $PROXY_PROTOCOL\n"
done
echo -e "$CONF" > /proxy.conf
/mediamtx /proxy.conf &
sleep 5
go tool pprof -text http://localhost:9999/debug/pprof/profile?seconds=15

View File

@ -1,21 +0,0 @@
ARG BASE_IMAGE
FROM $BASE_IMAGE
RUN apk add --no-cache \
ffmpeg
RUN wget -O /video.mkv http://www.larmoire.info/jellyfish/media/jellyfish-10-mbps-hd-h264.mkv
WORKDIR /s
COPY go.mod go.sum ./
RUN go mod download
COPY . ./
RUN go generate ./...
RUN go build -o /mediamtx .
COPY bench/publish/start.sh /
RUN chmod +x /start.sh
ENTRYPOINT [ "/start.sh" ]

View File

@ -1,27 +0,0 @@
#!/bin/sh -e
PUBLISHER_COUNT=50
PUBLISHER_PROTOCOL=tcp
#####################################################
# publishers
CONF=""
CONF="${CONF}pprof: yes\n"
CONF="${CONF}paths:\n"
CONF="${CONF} all_others:\n"
echo -e "$CONF" > /source.conf
/mediamtx /source.conf &
sleep 1
for i in $(seq 1 $PUBLISHER_COUNT); do
ffmpeg -hide_banner -loglevel error \
-re -stream_loop -1 -i /video.mkv -c copy -f rtsp \
-rtsp_transport $PUBLISHER_PROTOCOL rtsp://localhost:8554/source$i &
done
sleep 5
go tool pprof -text http://localhost:9999/debug/pprof/profile?seconds=15

View File

@ -1,21 +0,0 @@
ARG BASE_IMAGE
FROM $BASE_IMAGE
RUN apk add --no-cache \
ffmpeg
RUN wget -O /video.mkv http://www.larmoire.info/jellyfish/media/jellyfish-10-mbps-hd-h264.mkv
WORKDIR /s
COPY go.mod go.sum ./
RUN go mod download
COPY . ./
RUN go generate ./...
RUN go build -o /mediamtx .
COPY bench/read/start.sh /
RUN chmod +x /start.sh
ENTRYPOINT [ "/start.sh" ]

View File

@ -1,34 +0,0 @@
#!/bin/sh -e
READER_COUNT=50
READER_PROTOCOL=tcp
#####################################################
# source
CONF=""
CONF="${CONF}pprof: yes\n"
CONF="${CONF}paths:\n"
CONF="${CONF} all_others:\n"
echo -e "$CONF" > /source.conf
/mediamtx /source.conf &
sleep 1
ffmpeg -re -stream_loop -1 -i /video.mkv -c copy -f rtsp rtsp://localhost:8554/source &
sleep 1
#####################################################
# readers
for i in $(seq 1 $READER_COUNT); do
ffmpeg -hide_banner -loglevel error \
-rtsp_transport $READER_PROTOCOL \
-i rtsp://localhost:8554/source -c copy -f null - &
done
sleep 5
go tool pprof -text http://localhost:9999/debug/pprof/profile?seconds=15

View File

@ -1,4 +0,0 @@
bench:
docker build -q . -f bench/$(NAME)/Dockerfile -t temp \
--build-arg BASE_IMAGE=$(BASE_IMAGE)
docker run --rm -it -p 9999:9999 temp