Skip to content

Commit

Permalink
experiments
Browse files Browse the repository at this point in the history
  • Loading branch information
molguin92 committed May 5, 2024
1 parent eacbc1c commit d875e7d
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 0 deletions.
6 changes: 6 additions & 0 deletions analysis_2023/experiments_2024/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM molguin/edgedroid2:experiment-client
LABEL authors="molguin"

RUN apt-get update && apt-get install -y iproute2
COPY inner/run_experiment.sh /opt/run_experiment.sh
ENTRYPOINT ["/usr/bin/env", "bash", "/opt/run_experiment.sh"]
6 changes: 6 additions & 0 deletions analysis_2023/experiments_2024/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
IMG_NAME = experiment_client
SOURCES = $(wildcard **/*.py)

.PHONY: image
image: Dockerfile $(SOURCES)
docker build -t $(IMG_NAME) -f $< .
9 changes: 9 additions & 0 deletions analysis_2023/experiments_2024/inner/run_experiment.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -x

OUT_DIR="/opt/output"

tc qdisc add dev lo root netem delay "${LATENCY}"ms "${VARIANCE}"ms "${CORREL}"% distribution "${DIST:-"normal"}"

python3 /opt/edgedroid-experiments/experiment_server.py --truncate "${NUM_STEPS}" -v -o "${OUT_DIR}" localhost 5000 "${TRACE}" &
python3 /opt/edgedroid-experiments/experiment_client.py --truncate "${NUM_STEPS}" -v -o "${OUT_DIR}" "${MODEL}" localhost 5000 "${TRACE}"
22 changes: 22 additions & 0 deletions analysis_2023/experiments_2024/run_experiments.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash

set -e

# SETTINGS
LATENCY=50 # one-way latency!
VARIANCE=10 # also one-way
CORREL=25
NUM_STEPS=100


REPS_PER_EXP=10
OUT_DIR="./output"
mkdir -p "${OUT_DIR}"

for MODEL in legacy first-order first-order-median curve-high-neuro curve-low-neuro; do
EXP_OUT_DIR="${OUT_DIR}/${MODEL}"
mkdir -p "${EXP_OUT_DIR}"
docker run --rm -it --cap-add NET_ADMIN -v "${EXP_OUT_DIR}:/opt/output"\
-e LATENCY=${LATENCY} -e VARIANCE=${VARIANCE} -e CORREL=${CORREL} -e \
NUM_STEPS=${NUM_STEPS} -e TRACE=square00 -e MODEL=${MODEL} "experiment_client"
done

0 comments on commit d875e7d

Please sign in to comment.