tretelny / streaming-load-testing

Load generation tool for evaluation of DASH and HLS video streaming setups

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Streaming load testing

Load generation tool for evaluation of MPEG-DASH and HLS video streaming setups. This project is an extension of Locust open source software. This extension is NOT a product/solution by Unified Streaming.

Docs: MMSys2020 paper

Table of Contents

What is Locust

Locust is an open source tool for load testing of web applications. The software is optimized to support the emulation of a large number of users, without using a large number of threads by using an event-driven model. Locust allows writing specific user behaviour for load testing through plain Python programming language scripts.

How to use the tool

The following figure presents the possible command-line parameter configuration of the load testing tool.

Configuration parameters for streaming load-generator.

Configuration parameters

Use the tool in a hypervisor

In case you need to run the Python scripts from a VM you will need to clone the repository and install the Python requirements.txt by running the following commands.

#!/bin/bash
git clone https://github.com/unifiedstreaming/streaming-load-testing.git
cd streaming-load-testing
make init

Load test example

#!/bin/bash

HOST_URL=https://demo.unified-streaming.com \
    MANIFEST_FILE=/video/ateam/ateam.ism/ateam.mpd \
    mode=vod \
    play_mode=full_playback \
    bitrate=lowest_bitrate \
    locust -f load_generator/locustfiles/vod_dash_hls_sequence.py \
    --no-web -c 1 -r 1 --run-time 10s --only-summary \
    --csv=test-results/output_example 

Use the tool through a Docker image

Create Docker image by building the Docker file provided.

#!/bin/bash
git clone https://github.com/unifiedstreaming/streaming-load-testing.git
cd streaming-load-testing
make build

Run a simple load testing example using the built docker image. The following command will create a performance test and creates a folder with csv files results in the folder test-results.

Load test example

#!/bin/bash

docker run -it \
    -e "HOST_URL=https://demo.unified-streaming.com" \
    -e "MANIFEST_FILE=/video/ateam/ateam.ism/ateam.mpd" \
    -e "mode=vod" \
    -e "play_mode=full_playback" \
    -e "bitrate=lowest_bitrate" \
    -e "LOCUST_LOCUSTFILE=/load_generator/locustfiles/vod_dash_hls_sequence.py" \
    -e "LOCUST_HEADLESS=true" \
    -e "LOCUST_USERS=1" \
    -e "LOCUST_SPAWN_RATE=1" \
    -e "LOCUST_RUN_TIME=2s" \
    -e "LOCUST_ONLY_SUMMARY=true" \
    -p 8089:8089 \
    unifiedstreaming/load-generator:latest \
    --no-web

About

Load generation tool for evaluation of DASH and HLS video streaming setups

License:MIT License


Languages

Language:Python 91.2%Language:Makefile 7.2%Language:Dockerfile 1.6%