Skip to content

Commit

Permalink
Update plot
Browse files Browse the repository at this point in the history
  • Loading branch information
louisroyer committed Oct 24, 2024
1 parent 9c26b7d commit e20064b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,13 @@ plot/policy-diff:
@echo "[1/2] [4/6] Setting UE2 on edge 1"
@$(MAKE) ue/switch-edge/2
@echo "[1/2] [5/6] [$$(date --rfc-3339=seconds)] Starting ping from ue1 and ue2 (60s + 5s margin)"
@bash -c 'docker exec ue1-debug bash -c "ping -D -w 60 10.4.0.1 -i 0.1 > /volume/ping-policy-diff-sliceA.txt"' &
@bash -c 'docker exec ue2-debug bash -c "ping -D -w 60 10.4.0.1 -i 0.1 > /volume/ping-policy-diff-sliceB.txt"' &
@bash -c 'docker exec ue1-debug bash -c "ping -D -w 60 10.4.0.1 -i 0.1 > /volume/ping-policy-diff-areaA.txt"' &
@bash -c 'docker exec ue2-debug bash -c "ping -D -w 60 10.4.0.1 -i 0.1 > /volume/ping-policy-diff-areaB.txt"' &
@sleep 65
@echo "[1/2] [6/6] Stopping containers"
@$(MAKE) down
@echo "[2/2] Plotting data"
@scripts/plots/policy_diff.py $(BUILD_DIR)/volumes/ue1/ping-policy-diff-sliceA.txt $(BUILD_DIR)/volumes/ue2/ping-policy-diff-sliceB.txt $(BUILD_DIR)/volumes/ue1/plot-policy-diff.pdf
@scripts/plots/policy_diff.py $(BUILD_DIR)/volumes/ue1/ping-policy-diff-areaA.txt $(BUILD_DIR)/volumes/ue2/ping-policy-diff-areaB.txt $(BUILD_DIR)/volumes/ue1/plot-policy-diff.pdf


.PHONY: plot/latency-switch
Expand Down
4 changes: 2 additions & 2 deletions scripts/plots/policy_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ def plot(arguments: argparse.Namespace):
_, axplt = plt.subplots()
axplt.set_xlabel('Time (s)')
axplt.set_ylabel('RTT (ms)')
axplt.plot(res[0]['tsp'], res[0]['pqt'], color='tab:red', label='Slice A')
axplt.plot(res[1]['tsp'], res[1]['pqt'], color='tab:blue', label='Slice B')
axplt.plot(res[0]['tsp'], res[0]['pqt'], color='tab:red', label='UE1 in Area A accessing service S')
axplt.plot(res[1]['tsp'], res[1]['pqt'], color='tab:blue', label='UE2 in Area B accessing service S')
axplt.autoscale_view()
axplt.legend()
plt.savefig(arguments.output)
Expand Down

0 comments on commit e20064b

Please sign in to comment.