diff --git a/loadtest/README.md b/loadtest/README.md deleted file mode 100644 index 1caf953f1..000000000 --- a/loadtest/README.md +++ /dev/null @@ -1,35 +0,0 @@ -## Load Testing Devsy - -### Create the workspaces - -`./startWorkspaces.sh` - -### Run the load test and generate wait times - -`./run.sh` - -Update NUM_WORKSPACES or NUM_COMMANDS_PER_WORKSPACE to adjust load signature - -### Clean up - -`./deleteWorkspaces.sh` - -### Things to note - -`generateLoad.sh` contains the SSH command to generate load, change the command here to adjust how you want to generate traffic - -### Get core dump from loft - -``` -kubectl -n devsy-pro set env deployment/devsy DEVSYDEBUG=true - -kubectl -n devsy-pro port-forward loft-55df4d875f-j9vnd 8080:8080 & - -curl -s -v http://localhost:8080/debug/pprof/heap > $(date '+%Y-%m-%d-%H:%M:%S').out -``` - -### Profile the server every 30 seconds - -``` -while true; do curl -s -v http://localhost:8080/debug/pprof/heap > $(date '+%Y-%m-%d-%H:%M:%S').out; sleep 30; done -``` diff --git a/loadtest/deleteWorkspaces.sh b/loadtest/deleteWorkspaces.sh deleted file mode 100755 index 3a3f8f039..000000000 --- a/loadtest/deleteWorkspaces.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -export NUM_WORKSPACES=60 - -# Start the workspaces -for i in $(seq 1 $NUM_WORKSPACES); do - devsy delete --force "loadtest$i" & - sleep 2 -done - -wait diff --git a/loadtest/emulateTraffic.sh b/loadtest/emulateTraffic.sh deleted file mode 100755 index 86334ae21..000000000 --- a/loadtest/emulateTraffic.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -# SSH to the workspace and execute command -for j in $(seq 1 "$NUM_COMMANDS_PER_WORKSPACE"); do - ./generateLoad.sh "$1" - sleep 1 -done diff --git a/loadtest/generateLoad.sh b/loadtest/generateLoad.sh deleted file mode 100755 index 823e73e48..000000000 --- a/loadtest/generateLoad.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -devsy ssh "loadtest$1" --command="tr -dc A-Za-z0-9 /dev/null diff --git a/loadtest/init_monitor.sh b/loadtest/init_monitor.sh deleted file mode 100644 index d2cca6e6d..000000000 --- a/loadtest/init_monitor.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -#kubectl -n devsy-pro set env deployment/devsy DEVSYDEBUG=true - -kubectl -n devsy-pro port-forward "$(kubectl -n devsy-pro get pods -l app=devsy -o jsonpath="{.items[0].metadata.name}")" 8080:8080 diff --git a/loadtest/monitor.sh b/loadtest/monitor.sh deleted file mode 100755 index b5babe962..000000000 --- a/loadtest/monitor.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash - -mkdir results - -export INTERVAL_SECONDS=30 - -echo "Monitoring heap, go routines, and threads every $INTERVAL_SECONDS seconds ..." - -while true; do - curl -s -k https://localhost:8080/debug/pprof/heap >"./results/$(date '+%Y-%m-%d-%H:%M:%S').heap" - sleep "$INTERVAL_SECONDS" -done & - -while true; do - curl -s -k https://localhost:8080/debug/pprof/goroutine >"./results/$(date '+%Y-%m-%d-%H:%M:%S').cpu" - sleep "$INTERVAL_SECONDS" -done & - -while true; do - curl -s -k https://localhost:8080/debug/pprof/threadcreate >"./results/$(date '+%Y-%m-%d-%H:%M:%S').threads" - sleep "$INTERVAL_SECONDS" -done & - -trap 'trap - SIGTERM && kill -- -$$' SIGINT SIGTERM EXIT -wait diff --git a/loadtest/run.sh b/loadtest/run.sh deleted file mode 100755 index 981e8a16c..000000000 --- a/loadtest/run.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -export NUM_WORKSPACES=10 -export NUM_COMMANDS_PER_WORKSPACE=1 - -echo "Running $NUM_WORKSPACES workspaces with $NUM_COMMANDS_PER_WORKSPACE commands each ..." - -# SSH to the workspace and execute command -for j in $(seq 1 "$NUM_WORKSPACES"); do - time ./emulateTraffic.sh "$j" & - sleep 2 -done - -# Keep the session active to allow the commands to execute and use STDOUT -wait diff --git a/loadtest/startWorkspaces.sh b/loadtest/startWorkspaces.sh deleted file mode 100755 index 066a32bb2..000000000 --- a/loadtest/startWorkspaces.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -export NUM_WORKSPACES=20 - -# Start the workspaces -for i in $(seq 11 $NUM_WORKSPACES); do - devsy up --id "loadtest$i" --debug --ide none https://github.com/kubernetes/kubernetes -done - -wait