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