#!/usr/bin/env bash
#
# $Id$
# Author: Makarius
#
# DESCRIPTION: Standard statistics.
THIS=$(cd "$(dirname "$0")"; pwd -P)
PLATFORMS="at-poly at-sml-dev at64-poly at64-poly-5.1-para at-mac-poly-5.1-para afp"
ISABELLE_SESSIONS="\
HOL \
HOL-Algebra \
HOL-Auth \
HOL-Bali \
HOL-Complex \
HOL-Complex-ex \
HOL-Extraction \
HOL-Hoare \
HOL-HoareParallel \
HOL-Lambda \
HOL-Library \
HOL-MetisExamples \
HOL-MicroJava \
HOL-Nominal-Examples \
HOL-NumberTheory \
HOL-SET-Protocol \
HOL-UNITY \
HOL-ex \
ZF \
ZF-Constructible\
ZF-UNITY"
AFP_SESSIONS="\
CoreC++\
HOL-DiskPaxos\
HOL-Fermat3_4\
HOL-Flyspeck-Tame\
HOL-Group-Ring-Module\
HOL-Jinja\
HOL-JinjaThreads\
HOL-JiveDataStoreModel\
HOL-LinearQuantifierElim\
HOL-POPLmark-deBruijn\
HOL-RSAPSS\
HOL-SumSquares\
HOL-Valuation\
Simpl\
Simpl-BDD"
for PLATFORM in $PLATFORMS
do
if [ "$PLATFORM" = afp ]; then
SESSIONS="$AFP_SESSIONS"
else
SESSIONS="$ISABELLE_SESSIONS"
fi
"$THIS/isatest-statistics" "stats/$PLATFORM" "$PLATFORM" ${1:-100} $SESSIONS
cat > "stats/$PLATFORM.html" <<EOF
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head><title>Development Snapshot -- Performance Statistics</title></head>
<body>
<h1>$PLATFORM</h1>
EOF
for SESSION in $SESSIONS
do
echo "<br><img src="$PLATFORM/$SESSION.png"><br>" >> "stats/$PLATFORM.html"
done
echo "</body>" >> "stats/$PLATFORM.html"
echo "</html>" >> "stats/$PLATFORM.html"
done