run_bench_trigger.sh 438 B

1234567891011121314151617181920212223
  1. #!/bin/bash
  2. set -eufo pipefail
  3. def_tests=( \
  4. usermode-count kernel-count syscall-count \
  5. fentry fexit fmodret \
  6. rawtp tp \
  7. kprobe kprobe-multi \
  8. kretprobe kretprobe-multi \
  9. )
  10. tests=("$@")
  11. if [ ${#tests[@]} -eq 0 ]; then
  12. tests=("${def_tests[@]}")
  13. fi
  14. p=${PROD_CNT:-1}
  15. for t in "${tests[@]}"; do
  16. summary=$(sudo ./bench -w2 -d5 -a -p$p trig-$t | tail -n1 | cut -d'(' -f1 | cut -d' ' -f3-)
  17. printf "%-15s: %s\n" $t "$summary"
  18. done