build: remove generated artifacts and unsafe scripts

This commit is contained in:
2026-08-12 16:23:45 +09:00
parent 368e6adcd4
commit c41a1b4227
11 changed files with 131 additions and 111510 deletions

View File

@@ -1,23 +1,43 @@
#!/bin/sh
pkill strans
pkill strans-xim
sleep 1
set -eu
cd "$(dirname "$0")"
strans_pid=
perf_pid=
cleanup()
{
trap - 0 1 2 15
if test -n "$perf_pid"; then
kill -INT "$perf_pid" 2>/dev/null || true
wait "$perf_pid" 2>/dev/null || true
fi
if test -n "$strans_pid"; then
kill "$strans_pid" 2>/dev/null || true
wait "$strans_pid" 2>/dev/null || true
fi
}
trap cleanup 0 1 2 15
./strans map font &
strans_pid=$!
sleep 1
kill -0 "$strans_pid"
# warm up glyph cache
./bench/bench bench/bench.keys 100
echo "cache warmed up"
STRANS_PID=$(pgrep -x strans)
perf record -g -o bench/perf.data -p "$STRANS_PID" &
PERF_PID=$!
perf record -g -o bench/perf.data -p "$strans_pid" &
perf_pid=$!
sleep 1
kill -0 "$perf_pid"
./bench/bench bench/bench.keys 100
kill -INT $PERF_PID
wait $PERF_PID 2>/dev/null
pkill strans
kill -INT "$perf_pid"
wait "$perf_pid" 2>/dev/null || true
perf_pid=