1#!/bin/bash 2 3usage() { 4 echo "Usage: $(basename $0) [rust | rust-bytes | pcre1 | pcre2 | re2 | onig | tcl ]" >&2 5 exit 1 6} 7 8if [ $# = 0 ] || [ $1 = '-h' ] || [ $1 = '--help' ]; then 9 usage 10fi 11 12which="$1" 13shift 14case $which in 15 rust) 16 exec cargo bench --bench bench --features re-rust "$@" 17 ;; 18 rust-bytes) 19 exec cargo bench --bench bench --features re-rust-bytes "$@" 20 ;; 21 re2) 22 exec cargo bench --bench bench --features re-re2 "$@" 23 ;; 24 pcre1) 25 exec cargo bench --bench bench --features re-pcre1 "$@" 26 ;; 27 pcre2) 28 exec cargo bench --bench bench --features re-pcre2 "$@" 29 ;; 30 onig) 31 exec cargo bench --bench bench --features re-onig "$@" 32 ;; 33 tcl) 34 exec cargo bench --bench bench --features re-tcl "$@" 35 ;; 36 *) 37 usage 38 ;; 39esac 40