Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/scripts/dcperf_run_django.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/bash
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.


# shellcheck disable=SC1091,SC2128
. "$( dirname -- "$BASH_SOURCE"; )/utils_base.bash"


################################################################################
# Django Run Functions
################################################################################

run_django () {
local env_name="$1"
if [ "$env_name" == "" ]; then
echo "Usage: ${FUNCNAME[0]} ENV_NAME"
echo "Example(s):"
echo " ${FUNCNAME[0]} build_env"
return 1
else
echo "################################################################################"
echo "# Run Django"
echo "#"
echo "# [$(date --utc +%FT%T.%3NZ)] + ${FUNCNAME[0]} ${*}"
echo "################################################################################"
echo ""
fi


# shellcheck disable=SC2155
local env_prefix=$(env_name_or_prefix "${env_name}")

echo "[RUN] Running Django ..."

# (print_exec conda run --no-capture-output ${env_prefix} \
# python ./benchpress_cli.py run django_workload_default -r standalone -i "'{\"reps\": 1000, \"iterations\": 1}'") || return 1
./benchmarks/django_workload/bin/run.sh -r standalone -d 5M -i 1 p 1000 -l /siege.log -s urls.txt -c 127.0.0.1 -I cpython || true
echo "PWD"
echo $PWD
echo "Searching for django-uwsgi.log files:"
find_output=$(find . -name django-uwsgi.log)
echo "$find_output"
# cat django-workload/django-workload/django-uwsgi.log
}
93 changes: 93 additions & 0 deletions .github/scripts/dcperf_run_feedsim.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
#!/bin/bash
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.


# shellcheck disable=SC1091,SC2128
. "$( dirname -- "$BASH_SOURCE"; )/utils_base.bash"


################################################################################
# Run FeedSim
################################################################################

run_feedsim () {
local env_name="$1"
if [ "$env_name" == "" ]; then
echo "Usage: ${FUNCNAME[0]} ENV_NAME"
echo "Example(s):"
echo " ${FUNCNAME[0]} build_env"
return 1
else
echo "################################################################################"
echo "# Run FeedSim"
echo "#"
echo "# [$(date --utc +%FT%T.%3NZ)] + ${FUNCNAME[0]} ${*}"
echo "################################################################################"
echo ""
fi

# shellcheck disable=SC2155
local env_prefix=$(env_name_or_prefix "${env_name}")

echo "[RUN] Running FeedSim ..."
(print_exec conda run --no-capture-output ${env_prefix} \
python ./benchpress_cli.py run feedsim_autoscale -i "'{\"extra_args\": \"-q 5 -d 20\"}'") || true
cat benchpress.log

# Print all feedsim results and logs from benchmark_metrics_* directories
echo ""
echo "[INFO] Searching for FeedSim results in benchmark_metrics_* directories..."
for metrics_dir in benchmark_metrics_*/; do
if [ -d "$metrics_dir" ]; then
echo ""
echo "=== Found directory: $metrics_dir ==="

# Print all feedsim_results*.txt files
for results_file in "${metrics_dir}"feedsim_results*.txt; do
if [ -f "$results_file" ]; then
echo ""
echo "--- Contents of $results_file ---"
cat "$results_file"
fi
done

# Print all feedsim-multi-inst-*.log files
for log_file in "${metrics_dir}"feedsim-multi-inst-*.log; do
if [ -f "$log_file" ]; then
echo ""
echo "--- Contents of $log_file ---"
cat "$log_file"
fi
done
fi
done

# Run benchpress and capture output
# if output=$(print_exec conda run --no-capture-output ${env_prefix} python ./benchpress_cli.py run feedsim_autoscale -i "'{\"extra_args\": \"-q 5 -d 20\"}'" 2>&1); then
# echo "$output"
# else
# echo "ERROR: Benchpress command failed to execute"
# return 1
# fi

# # Extract final_achieved_qps from the output and validate
# final_qps=$(echo "$output" | grep -A3 '"overall"' | grep -o '"final_achieved_qps":[^,]*' | grep -o '[0-9.]*' | head -1)

# if [ -z "$final_qps" ]; then
# echo "ERROR: Could not extract final_achieved_qps from output"
# return 1
# fi

# # Check if final_achieved_qps is greater than zero
# if (( $(echo "$final_qps > 0" | bc -l) )); then
# echo "SUCCESS: final_achieved_qps ($final_qps) is greater than zero"
# return 0
# else
# echo "FAILURE: final_achieved_qps ($final_qps) is not greater than zero"
# return 1
# fi
}
61 changes: 61 additions & 0 deletions .github/scripts/dcperf_run_mediawiki.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#!/bin/bash
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.


# shellcheck disable=SC1091,SC2128
. "$( dirname -- "$BASH_SOURCE"; )/utils_base.bash"


################################################################################
# Run Mediawiki
################################################################################

run_mediawiki () {
local env_name="$1"
if [ "$env_name" == "" ]; then
echo "Usage: ${FUNCNAME[0]} ENV_NAME"
echo "Example(s):"
echo " ${FUNCNAME[0]} build_env"
return 1
else
echo "################################################################################"
echo "# Run Mediawiki"
echo "#"
echo "# [$(date --utc +%FT%T.%3NZ)] + ${FUNCNAME[0]} ${*}"
echo "################################################################################"
echo ""
fi

# shellcheck disable=SC2155
local env_prefix=$(env_name_or_prefix "${env_name}")
export DEBIAN_FRONTEND=noninteractive
echo "[RUN] Running Mediawiki ..."
# (print_exec conda run --no-capture-output ${env_prefix} \
# python ./benchpress_cli.py run oss_performance_mediawiki_mini) || return 1

./packages/mediawiki/run.sh \
-r/usr/local/hphpi/legacy/bin/hhvm \
-nnginx \
-L wrk \
-s benchmarks/oss_performance_mediawiki/wrk/wrk \
-T default_no_temp_dir \
-p -- \
--mediawiki \
--client-duration=4s \
--client-timeout=60s \
--run-as-root \
--i-am-not-benchmarking \
--shorten-health-check \
--skip-single-request-warmup \
--skip-sleep-between-warmups \
--hhvm-extra-arguments="-vEval.JitRetranslateAllSeconds=5" \
--num-multi-req-warmups=-1 \
--no-load-if-pending-translate \
--first-multi-warmup-duration=25 \
--subseq-multi-warmup-duration=5 \
--load-gen-seed=1000
}
68 changes: 68 additions & 0 deletions .github/scripts/dcperf_run_spark.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#!/bin/bash
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.


# shellcheck disable=SC1091,SC2128
. "$( dirname -- "$BASH_SOURCE"; )/utils_base.bash"


################################################################################
# Run Spark
################################################################################

run_spark () {
local env_name="$1"
if [ "$env_name" == "" ]; then
echo "Usage: ${FUNCNAME[0]} ENV_NAME"
echo "Example(s):"
echo " ${FUNCNAME[0]} build_env"
return 1
else
echo "################################################################################"
echo "# Run Spark"
echo "#"
echo "# [$(date --utc +%FT%T.%3NZ)] + ${FUNCNAME[0]} ${*}"
echo "################################################################################"
echo ""
fi

# shellcheck disable=SC2155
local env_prefix=$(env_name_or_prefix "${env_name}")

echo "[RUN] Running Spark ..."
wget https://github.com/facebookresearch/DCPerf-datasets/releases/download/v1.0/bpc_t93586_s2_synthetic_1GB.tar.gz
tar -xzf bpc_t93586_s2_synthetic_1GB.tar.gz
mkdir /flash23
cp -rf bpc_t93586_s2_synthetic_1GB /flash23/
(print_exec conda run --no-capture-output ${env_prefix} \
python ./benchpress_cli.py run spark_standalone_remote_mini -i "'{\"dataset_name\":\"bpc_t93586_s2_synthetic_1GB\"}'") || return 1

# Print all files from benchmark_metrics_*/work directories
echo ""
echo "[INFO] Searching for files in benchmark_metrics_*/work directories..."
for metrics_dir in benchmark_metrics_*/; do
if [ -d "$metrics_dir" ]; then
echo ""
echo "=== Found directory: $metrics_dir ==="

work_dir="${metrics_dir}work"
if [ -d "$work_dir" ]; then
echo ""
echo "=== Checking work directory: $work_dir ==="

# Print all files in the work directory
for file in "$work_dir"/*; do
if [ -f "$file" ]; then
echo ""
echo "--- Contents of $file ---"
cat "$file"
fi
done
fi
fi
done
}
39 changes: 39 additions & 0 deletions .github/scripts/dcperf_run_syscall.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.


# shellcheck disable=SC1091,SC2128
. "$( dirname -- "$BASH_SOURCE"; )/utils_base.bash"


################################################################################
# Run syscall
################################################################################

run_syscall () {
local env_name="$1"
if [ "$env_name" == "" ]; then
echo "Usage: ${FUNCNAME[0]} ENV_NAME"
echo "Example(s):"
echo " ${FUNCNAME[0]} build_env"
return 1
else
echo "################################################################################"
echo "# Run Syscall"
echo "#"
echo "# [$(date --utc +%FT%T.%3NZ)] + ${FUNCNAME[0]} ${*}"
echo "################################################################################"
echo ""
fi

# shellcheck disable=SC2155
local env_prefix=$(env_name_or_prefix "${env_name}")

echo "[RUN] Running Syscall ..."
(print_exec conda run --no-capture-output ${env_prefix} \
python ./benchpress_cli.py -b system run syscall_single_core) || return 1
}
63 changes: 63 additions & 0 deletions .github/scripts/dcperf_run_tao_bench.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#!/bin/bash
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.


# shellcheck disable=SC1091,SC2128
. "$( dirname -- "$BASH_SOURCE"; )/utils_base.bash"


################################################################################
# tao_bench Run Functions
################################################################################

run_tao_bench () {
local env_name="$1"
if [ "$env_name" == "" ]; then
echo "Usage: ${FUNCNAME[0]} ENV_NAME"
echo "Example(s):"
echo " ${FUNCNAME[0]} build_env"
return 1
else
echo "################################################################################"
echo "# Run Tao_bench"
echo "#"
echo "# [$(date --utc +%FT%T.%3NZ)] + ${FUNCNAME[0]} ${*}"
echo "################################################################################"
echo ""
fi


# shellcheck disable=SC2155
local env_prefix=$(env_name_or_prefix "${env_name}")

echo "[RUN] Running Tao_bench ..."

# Run benchpress and capture output
if output=$(print_exec conda run --no-capture-output ${env_prefix} python ./benchpress_cli.py run tao_bench_standalone -i "'{\"memsize\": 0.5, \"stats_interval\":1000, \"warmup_time\": 60, \"test_time\": 60}'" 2>&1); then
echo "$output"
else
echo "ERROR: Benchpress command failed to execute"
return 1
fi

# Extract total_qps from the output and validate
total_qps=$(echo "$output" | grep -o '"total_qps":[^,]*' | grep -o '[0-9.]*' | head -1)

if [ -z "$total_qps" ]; then
echo "ERROR: Could not extract total_qps from output"
return 1
fi

# Check if total_qps is greater than zero
if (( $(echo "$total_qps > 0" | bc -l) )); then
echo "SUCCESS: total_qps ($total_qps) is greater than zero"
return 0
else
echo "FAILURE: total_qps ($total_qps) is not greater than zero"
return 1
fi
}
Loading
Loading