24 lines
536 B
Bash
24 lines
536 B
Bash
|
#!/usr/bin/env bash
|
||
|
#
|
||
|
# Time running a single parse without invoking a compare with emacs.
|
||
|
set -euo pipefail
|
||
|
IFS=$'\n\t'
|
||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||
|
|
||
|
: ${PROFILE:="release-lto"}
|
||
|
|
||
|
cd "$DIR/../"
|
||
|
|
||
|
function main {
|
||
|
local additional_flags=()
|
||
|
if [ "$PROFILE" = "dev" ] || [ "$PROFILE" = "debug" ]; then
|
||
|
PROFILE="debug"
|
||
|
else
|
||
|
additional_flags+=(--profile "$PROFILE")
|
||
|
fi
|
||
|
cargo build --no-default-features "${additional_flags[@]}"
|
||
|
time ./target/${PROFILE}/compare
|
||
|
}
|
||
|
|
||
|
main "${@}"
|