Skip to content
This repository was archived by the owner on Feb 23, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Mozilla AutoPush Load-Tester

# SyncStorage-LoadTest
#
FROM python:3-slim

RUN mkdir -p /app
ADD . /app
WORKDIR /app

# Building:
# you can build a local docker image using
# `docker build . --tag syncstorage-loadtest:local`

# system setup
RUN \
BUILD_DEPS="git build-essential" && \
# wget not required but nice to have
RUN_DEPS="wget libssl-dev" && \
apt-get update && \
apt-get install -yq --no-install-recommends ${BUILD_DEPS} ${RUN_DEPS} && \
pip install virtualenv && \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could drop the venv entirely since it's all self hosted in docker

python -m virtualenv -p `which python` apenv

# app install
RUN \
./apenv/bin/pip install pyasn1 && \
./apenv/bin/pip install -r requirements.txt && \
apt-get purge -yq --auto-remove ${BUILD_DEPS} && \
apt-get autoremove -yqq && \
apt-get clean -y

# Using:
# Start an interactive terminal using
# `docker run --net=host -it syncstorage-loadtest:local`
# This will start a bash shell as root.
# You can fire off a load test by calling:
# `SERVER_URL=http://${HOST}:${PORT}#${SECRET} ./apenv/bin/molotov -v`

ENTRYPOINT ["/bin/bash"]
7 changes: 7 additions & 0 deletions run_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#! /bin/bash -xe
# the Sync server URL. (Presumes a locally running server.)
# *NOTE* this will use the first arg, but will default to `localhost:8000`
HOST=${1:-http://localhost:8000}
# The sync shared secret.
SECRET=${2:-secret0}
SERVER_URL=${HOST}#${SECRET} apenv/bin/molotov --processes 2 --workers 149 --verbose