Skip to content
Merged
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
11 changes: 7 additions & 4 deletions scripts/perf-lab/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ states:

REPO_DIR: ${{BASE_DIR}}/spring-quarkus-perf-comparison
SCRIPTS_DIR: ${{REPO_DIR}}/${{PROJ_REPO_NAME}}/scripts/perf-lab
JS_SCRIPTS_DIR: ${{SCRIPTS_DIR}}/scripts
SPRING3_BOOT_DIR: ${{REPO_DIR}}/${{PROJ_REPO_NAME}}/springboot3
QUARKUS3_DIR : ${{REPO_DIR}}/${{PROJ_REPO_NAME}}/quarkus3
TARGET_URL: http://localhost:8080/fruits
Expand Down Expand Up @@ -133,7 +134,7 @@ scripts:
- log: Checked out repo
- sh: git remote get-url origin
- sh: git branch --show-current
- sh: cd ${{SCRIPTS_DIR}}
- sh: cd ${{JS_SCRIPTS_DIR}}
- sh: npm install [email protected]

update-spring-boot-version:
Expand Down Expand Up @@ -277,7 +278,7 @@ scripts:
then:
- script: start-test-services
- script: sync-drop-fs-cache
- sh: node ${{SCRIPTS_DIR}}/time.js "${{= "${{RUNTIME.runCmd}}".trim().replace(/ +/g, ' ') }}" ${{TARGET_URL}} | awk '{print $1}'
- sh: node ${{JS_SCRIPTS_DIR}}/time.js "${{= "${{RUNTIME.runCmd}}".trim().replace(/ +/g, ' ') }}" ${{TARGET_URL}} | awk '{print $1}'
then:
- set-state: START_TIME
- script: state-array-push
Expand Down Expand Up @@ -456,9 +457,11 @@ hosts:
roles:
test-cgroups:
hosts:
- target-host
# - target-host-root
# - target-host
- target-host-root
setup-scripts:
- detect-os
- capture-os-info
- create-cgroup:
with:
CGROUP_NAME: ${{config.cgroup.name}}
Expand Down
32 changes: 27 additions & 5 deletions scripts/perf-lab/run-benchmarks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,30 @@ print_values() {
}

make_json_array() {
local bashArray=("$@")
local jsonArray="${bashArray[*]}"
echo "['${jsonArray// /','}']"
local items=($@) # Split on whitespace into array
local json="["
local first=true

for item in "${items[@]}"; do
if [ "$first" = true ]; then
first=false
else
json+=","
fi

json+="\"$item\""
done

json+="]"
echo "$json"
}

#make_json_array() {
# local bashArray=("$@")
# local jsonArray="${bashArray[*]}"
# echo "['${jsonArray// /','}']"
#}

setup_jbang() {
if command -v jbang &> /dev/null; then
echo "Using installed jbang ($(jbang --version))"
Expand Down Expand Up @@ -158,6 +177,8 @@ run_benchmarks() {

#print_values

set -x

# jbang qDup@hyperfoil --trace="target" \
${JBANG_CMD} qDup@hyperfoil \
-B ${OUTPUT_DIR} \
Expand All @@ -182,11 +203,12 @@ ${JBANG_CMD} qDup@hyperfoil \
-S config.repo.url=${SCM_REPO_URL} \
-S env.USER=${USER} \
-S env.TARGET=${target} \
-S env.HOST=${HOST} \
-S config.num_iterations=${ITERATIONS} \
-S PROJ_REPO_NAME="$(basename ${SCM_REPO_URL} .git)" \
-S RUNTIMES="$(make_json_array ${RUNTIMES})" \
-S RUNTIMES="$(make_json_array $RUNTIMES)" \
-S PAUSE_TIME=${WAIT_TIME} \
-S TESTS="$(make_json_array ${TESTS_TO_RUN})" \
-S TESTS="$(make_json_array $TESTS_TO_RUN)" \
-S DROP_OS_FILESYSTEM_CACHES=${DROP_OS_FILESYSTEM_CACHES}
}

Expand Down
34 changes: 0 additions & 34 deletions scripts/perf-lab/scripts/time.docker.js

This file was deleted.