mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-09 13:26:48 +00:00
Extract host-guest benchmark CI script
This commit is contained in:
parent
5564adee74
commit
0620ec58e4
@ -84,7 +84,7 @@ run_benchmark() {
|
|||||||
;;
|
;;
|
||||||
"host_guest")
|
"host_guest")
|
||||||
echo "Running benchmark ${benchmark} on host and guest..."
|
echo "Running benchmark ${benchmark} on host and guest..."
|
||||||
bash "${BENCHMARK_DIR}/${benchmark_root}/bench_runner.sh" \
|
bash "${BENCHMARK_DIR}/common/host_guest_bench_runner.sh" \
|
||||||
"${BENCHMARK_DIR}/${benchmark}" \
|
"${BENCHMARK_DIR}/${benchmark}" \
|
||||||
"${asterinas_cmd}" \
|
"${asterinas_cmd}" \
|
||||||
"${linux_cmd}" \
|
"${linux_cmd}" \
|
||||||
|
@ -14,8 +14,16 @@ LINUX_OUTPUT=$5
|
|||||||
BENCHMARK_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)/../"
|
BENCHMARK_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)/../"
|
||||||
source "${BENCHMARK_DIR}/common/prepare_host.sh"
|
source "${BENCHMARK_DIR}/common/prepare_host.sh"
|
||||||
|
|
||||||
# Persist iperf3 port
|
if [[ "$BENCHMARK_PATH" =~ "iperf" ]]; then
|
||||||
export IPERF_PORT=5201
|
# Persist Iperf port
|
||||||
|
export IPERF_PORT=5201
|
||||||
|
elif [[ "$BENCHMARK_PATH" =~ "nginx" ]]; then
|
||||||
|
# Persist Nginx port
|
||||||
|
export NGINX_PORT=8080
|
||||||
|
elif [[ "$BENCHMARK_PATH" =~ "redis" ]]; then
|
||||||
|
# Persist Redis port
|
||||||
|
export REDIS_PORT=6379
|
||||||
|
fi
|
||||||
|
|
||||||
# Function to run the benchmark
|
# Function to run the benchmark
|
||||||
# Parameters:
|
# Parameters:
|
Loading…
x
Reference in New Issue
Block a user