chore: PERF_WINDOW_CAPACITY scripts

master
Sean McBride 3 years ago
parent 61baa40ba4
commit 63e38f0e7c

@ -38,16 +38,16 @@ run_samples() {
# Scrape the perf window size from the source if possible # Scrape the perf window size from the source if possible
# TODO: Make a util function # TODO: Make a util function
local -r perf_window_path="$(path_join "$__run_sh__base_path" ../../../runtime/include/perf_window_t.h)" local -r perf_window_path="$(path_join "$__run_sh__base_path" ../../../runtime/include/perf_window_t.h)"
local -i perf_window_capacity local -i PERF_WINDOW_CAPACITY
if ! perf_window_capacity=$(grep "perf_window_capacity =" < "$perf_window_path" | cut -d\ -f3); then if ! PERF_WINDOW_CAPACITY=$(grep "PERF_WINDOW_CAPACITY =" < "$perf_window_path" | cut -d\ -f3); then
printf "Failed to scrape perf_window_capacity from ../../include/perf_window.h\n" printf "Failed to scrape PERF_WINDOW_CAPACITY from ../../include/perf_window.h\n"
printf "Defaulting to 16\n" printf "Defaulting to 16\n"
perf_window_capacity=16 PERF_WINDOW_CAPACITY=16
fi fi
local -ir perf_window_capacity local -ir PERF_WINDOW_CAPACITY
printf "Running Samples: " printf "Running Samples: "
hey -disable-compression -disable-keepalive -disable-redirects -n "$perf_window_capacity" -c "$perf_window_capacity" -q 200 -cpus 3 -o csv -m GET "http://${hostname}:10000/empty" 1> /dev/null 2> /dev/null || { hey -disable-compression -disable-keepalive -disable-redirects -n "$PERF_WINDOW_CAPACITY" -c "$PERF_WINDOW_CAPACITY" -q 200 -cpus 3 -o csv -m GET "http://${hostname}:10000/empty" 1> /dev/null 2> /dev/null || {
printf "[ERR]\n" printf "[ERR]\n"
panic "samples failed" panic "samples failed"
return 1 return 1

@ -41,22 +41,22 @@ run_samples() {
# Scrape the perf window size from the source if possible # Scrape the perf window size from the source if possible
# TODO: Make a util function # TODO: Make a util function
local -r perf_window_path="$(path_join "$__run_sh__base_path" ../../../runtime/include/perf_window_t.h)" local -r perf_window_path="$(path_join "$__run_sh__base_path" ../../../runtime/include/perf_window_t.h)"
local -i perf_window_capacity local -i PERF_WINDOW_CAPACITY
if ! perf_window_capacity=$(grep "perf_window_capacity =" < "$perf_window_path" | cut -d\ -f3); then if ! PERF_WINDOW_CAPACITY=$(grep "PERF_WINDOW_CAPACITY =" < "$perf_window_path" | cut -d\ -f3); then
printf "Failed to scrape perf_window_capacity from ../../../runtime/include/perf_window.h\n" printf "Failed to scrape PERF_WINDOW_CAPACITY from ../../../runtime/include/perf_window.h\n"
printf "Defaulting to 16\n" printf "Defaulting to 16\n"
perf_window_capacity=16 PERF_WINDOW_CAPACITY=16
fi fi
local -ir perf_window_capacity local -ir PERF_WINDOW_CAPACITY
printf "Running Samples: " printf "Running Samples: "
hey -disable-compression -disable-keepalive -disable-redirects -n "$perf_window_capacity" -c "$perf_window_capacity" -cpus 3 -t 0 -o csv -m GET -d "40\n" "http://${hostname}:10010/fib2" 1> /dev/null 2> /dev/null || { hey -disable-compression -disable-keepalive -disable-redirects -n "$PERF_WINDOW_CAPACITY" -c "$PERF_WINDOW_CAPACITY" -cpus 3 -t 0 -o csv -m GET -d "40\n" "http://${hostname}:10010/fib2" 1> /dev/null 2> /dev/null || {
printf "[ERR]\n" printf "[ERR]\n"
panic "fib40 samples failed with $?" panic "fib40 samples failed with $?"
return 1 return 1
} }
hey -disable-compression -disable-keepalive -disable-redirects -n "$perf_window_capacity" -c "$perf_window_capacity" -cpus 3 -t 0 -o csv -m GET -d "10\n" "http://${hostname}:100010/fib" 1> /dev/null 2> /dev/null || { hey -disable-compression -disable-keepalive -disable-redirects -n "$PERF_WINDOW_CAPACITY" -c "$PERF_WINDOW_CAPACITY" -cpus 3 -t 0 -o csv -m GET -d "10\n" "http://${hostname}:100010/fib" 1> /dev/null 2> /dev/null || {
printf "[ERR]\n" printf "[ERR]\n"
panic "fib10 samples failed with $?" panic "fib10 samples failed with $?"
return 1 return 1

@ -38,22 +38,22 @@ run_samples() {
# Scrape the perf window size from the source if possible # Scrape the perf window size from the source if possible
# TODO: Make a util function # TODO: Make a util function
local -r perf_window_path="$(path_join "$__run_sh__base_path" ../../runtime/include/perf_window_t.h)" local -r perf_window_path="$(path_join "$__run_sh__base_path" ../../runtime/include/perf_window_t.h)"
local -i perf_window_capacity local -i PERF_WINDOW_CAPACITY
if ! perf_window_capacity=$(grep "perf_window_capacity =" < "$perf_window_path" | cut -d\ -f3); then if ! PERF_WINDOW_CAPACITY=$(grep "PERF_WINDOW_CAPACITY =" < "$perf_window_path" | cut -d\ -f3); then
printf "Failed to scrape perf_window_capacity from ../../runtime/include/perf_window.h\n" printf "Failed to scrape PERF_WINDOW_CAPACITY from ../../runtime/include/perf_window.h\n"
printf "Defaulting to 16\n" printf "Defaulting to 16\n"
perf_window_capacity=16 PERF_WINDOW_CAPACITY=16
fi fi
local -ir perf_window_capacity local -ir PERF_WINDOW_CAPACITY
printf "Running Samples: " printf "Running Samples: "
hey -disable-compression -disable-keepalive -disable-redirects -n "$perf_window_capacity" -c "$perf_window_capacity" -cpus 3 -t 0 -o csv -m GET -d "40\n" "http://${hostname}:10000/fibonacci_10" 1> /dev/null 2> /dev/null || { hey -disable-compression -disable-keepalive -disable-redirects -n "$PERF_WINDOW_CAPACITY" -c "$PERF_WINDOW_CAPACITY" -cpus 3 -t 0 -o csv -m GET -d "40\n" "http://${hostname}:10000/fibonacci_10" 1> /dev/null 2> /dev/null || {
printf "[ERR]\n" printf "[ERR]\n"
panic "fibonacci_40 samples failed with $?" panic "fibonacci_40 samples failed with $?"
return 1 return 1
} }
hey -disable-compression -disable-keepalive -disable-redirects -n "$perf_window_capacity" -c "$perf_window_capacity" -cpus 3 -t 0 -o csv -m GET -d "10\n" "http://${hostname}:10000/fibonacci_10" 1> /dev/null 2> /dev/null || { hey -disable-compression -disable-keepalive -disable-redirects -n "$PERF_WINDOW_CAPACITY" -c "$PERF_WINDOW_CAPACITY" -cpus 3 -t 0 -o csv -m GET -d "10\n" "http://${hostname}:10000/fibonacci_10" 1> /dev/null 2> /dev/null || {
printf "[ERR]\n" printf "[ERR]\n"
panic "fibonacci_10 samples failed with $?" panic "fibonacci_10 samples failed with $?"
return 1 return 1

Loading…
Cancel
Save