Skip to content

Instantly share code, notes, and snippets.

@Huang-Wei
Created December 20, 2018 23:32
Show Gist options
  • Save Huang-Wei/a17dce0e4cf924e8af481f307bfec6ad to your computer and use it in GitHub Desktop.
Save Huang-Wei/a17dce0e4cf924e8af481f307bfec6ad to your computer and use it in GitHub Desktop.
a script to run k8s scheduler benchmark testings (run under k8s src code directory)
#!/usr/bin/env bash
times=10
sleepInterval=20 # for eliminating impact of in-memory pages in os's perspective
git checkout .
git clean -fd
mkdir -p ~/run-vanilla
for i in $(seq 1 $times); do
echo "========Trying Vanilla #$i========="
KUBE_TIMEOUT="-timeout 3600s" make test-integration WHAT=./test/integration/scheduler_perf KUBE_TEST_VMODULE="''" KUBE_TEST_ARGS="-run=xxx -bench=BenchmarkScheduling" &> ~/run-vanilla/$i.log
sed -i '/^[IWET+]/d' ~/run-vanilla/$i.log
sleep $sleepInterval
done
# Gets your change into a patch file
git apply ~/podaffinity.diff.1
mkdir -p ~/run-change1
for i in $(seq 1 $times); do
echo "========Trying Change1 #$i========="
KUBE_TIMEOUT="-timeout 3600s" make test-integration WHAT=./test/integration/scheduler_perf KUBE_TEST_VMODULE="''" KUBE_TEST_ARGS="-run=xxx -bench=BenchmarkScheduling" &> ~/run-change1/$i.log
sed -i '/^[IWET+]/d' ~/run-change1/$i.log
sleep $sleepInterval
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment