added correct commands and removed duplicate stress functions
This commit is contained in:
@@ -142,12 +142,6 @@ compile_fork_bomb() {
|
||||
"$ROOT_DIR/fork_bomb/fork_bomb.c"
|
||||
}
|
||||
|
||||
compile_max_limit() {
|
||||
log "Compiling stress"
|
||||
gcc -O2 -o "$ROOT_DIR/Maximum_limit_stress_test/stress" \
|
||||
"$ROOT_DIR/Maximum_limit_stress_test/stress.c"
|
||||
}
|
||||
|
||||
compile_thread_stress() {
|
||||
log "Compiling thread_stress"
|
||||
gcc -O2 -pthread -o "$ROOT_DIR/thread_stress_test/thread_stress" \
|
||||
@@ -156,13 +150,11 @@ compile_thread_stress() {
|
||||
|
||||
compile_creation_time
|
||||
compile_fork_bomb
|
||||
compile_max_limit
|
||||
compile_thread_stress
|
||||
|
||||
# Defaults (override by env vars)
|
||||
ALLOW_DANGEROUS=${ALLOW_DANGEROUS:-0}
|
||||
FORK_BOMB_SECONDS=${FORK_BOMB_SECONDS:-5}
|
||||
MAX_LIMIT_SECONDS=${MAX_LIMIT_SECONDS:-5}
|
||||
CREATION_TIME_ITERS=${CREATION_TIME_ITERS:-"100 1000 10000"}
|
||||
CREATION_TIME_SECONDS=${CREATION_TIME_SECONDS:-60}
|
||||
|
||||
@@ -186,17 +178,6 @@ else
|
||||
echo "timestamp,elapsed_s,load1,load5,load15,mem_total_kb,mem_available_kb,mem_used_kb,proc_count,thread_count_total,pid,cpu_pct,rss_kb,vsz_kb,stack_kb,heap_kb,proc_threads" > "$OUT_DIR/fork_bomb.csv"
|
||||
fi
|
||||
|
||||
if [ "$ALLOW_DANGEROUS" -eq 1 ]; then
|
||||
run_with_sampling \
|
||||
"max_limit_stress" \
|
||||
"cd '$ROOT_DIR/Maximum_limit_stress_test' && ./stress" \
|
||||
"$OUT_DIR/max_limit_stress.csv" \
|
||||
"$MAX_LIMIT_SECONDS"
|
||||
else
|
||||
log "Skipping max_limit_stress (set ALLOW_DANGEROUS=1 to run)"
|
||||
echo "timestamp,elapsed_s,load1,load5,load15,mem_total_kb,mem_available_kb,mem_used_kb,proc_count,thread_count_total,pid,cpu_pct,rss_kb,vsz_kb,stack_kb,heap_kb,proc_threads" > "$OUT_DIR/max_limit_stress.csv"
|
||||
fi
|
||||
|
||||
run_with_sampling \
|
||||
"thread_recursive_scaling" \
|
||||
"cd '$ROOT_DIR/thread_recursive_scaling' && ./run_thread_recursive.sh" \
|
||||
|
||||
Reference in New Issue
Block a user