2023-08-27 20:51:44 +00:00
|
|
|
#!/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"}
|
|
|
|
|
|
|
|
function main {
|
|
|
|
local additional_flags=()
|
|
|
|
if [ "$PROFILE" = "dev" ] || [ "$PROFILE" = "debug" ]; then
|
|
|
|
PROFILE="debug"
|
|
|
|
else
|
|
|
|
additional_flags+=(--profile "$PROFILE")
|
|
|
|
fi
|
2023-09-09 01:50:32 +00:00
|
|
|
(cd "$DIR/../" && cargo build --no-default-features "${additional_flags[@]}")
|
|
|
|
time "$DIR/../target/${PROFILE}/parse" "${@}"
|
2023-08-27 20:51:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
main "${@}"
|