#!/usr/bin/env bash set -euxo pipefail cmake --preset release 1>&2 # We benchmark against stage2/bin to test new optimizations. timeout -s KILL 1h time make -C build/release -j$(nproc) stage3 1>&2 export PATH=$PWD/build/release/stage2/bin:$PATH # The extra opts used to be passed to the Makefile during benchmarking only but with Lake it is # easier to configure them statically. cmake -B build/release/stage3 -S src -DLEAN_EXTRA_LAKEFILE_TOML='weakLeanArgs=["-Dprofiler=true", "-Dprofiler.threshold=9999999", "--stats"]' 1>&2 ( cd tests/bench timeout -s KILL 1h time temci exec --config speedcenter.yaml --in speedcenter.exec.velcom.yaml 1>&2 temci report run_output.yaml --reporter codespeed2 ) if [ -d .git ]; then DIR="$(git rev-parse @)" BASE_URL="https://speed.lean-lang.org/lean4-out/$DIR" { cat <<'EOF' Lakeprof Report

Lakeprof Report

EOF echo "
"
        (cd src; lakeprof report -prc)
        echo "
" echo "" } | tee index.html curl -T index.html $BASE_URL/index.html curl -T src/lakeprof.log $BASE_URL/lakeprof.log curl -T src/lakeprof.trace_event $BASE_URL/lakeprof.trace_event fi