add bench

This commit is contained in:
2026-02-08 17:57:23 +09:00
parent 64d50afc6b
commit 9afad8e4ff
7 changed files with 240 additions and 3 deletions

23
bench.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/sh
pkill strans
pkill strans-xim
sleep 1
./strans map font &
sleep 1
# 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=$!
sleep 1
./bench/bench bench/bench.keys 100
kill -INT $PERF_PID
wait $PERF_PID 2>/dev/null
pkill strans