Skip to content

Commit

Permalink
Merge pull request #4 from GaloisInc/bench
Browse files Browse the repository at this point in the history
Bench
  • Loading branch information
jprider63 committed Aug 22, 2024
2 parents a03b55a + 7be604d commit 93be27a
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions tests/run-ci-benchmarks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,42 @@ DIRNAME=$(dirname "$0")

SUCC=$(find "${DIRNAME}"/cn -name '*.c' | grep -v '\.error\.c')

COUNT=0
for TEST in ${SUCC}; do
let COUNT=${COUNT}+1
done

INDEX=0
echo $SUCC
echo $COUNT
for TEST in ${SUCC}; do
echo ${INDEX}

# Record wall clock time in seconds
/usr/bin/time -f "%e" -o /tmp/time cn verify ${TEST}
TIME=$(cat /tmp/time)

# Hack to output JSON.
cat << EOF >> ${JSON_FILE}
# If we're last, don't print a trailing comma.
if [[ ${INDEX} -eq ${COUNT}-1 ]]; then
# Hack to output JSON.
cat << EOF >> ${JSON_FILE}
{
"name": "${TEST}",
"unit": "Seconds",
"value": ${TIME}
}
EOF
else
cat << EOF >> ${JSON_FILE}
{
"name": "${TEST}",
"unit": "Seconds",
"value": ${TIME}
},
EOF
fi

let INDEX=${INDEX}+1
done

cat << EOF >> ${JSON_FILE}
Expand Down

0 comments on commit 93be27a

Please sign in to comment.