1
0

proj: Add perf/

This commit is contained in:
2025-08-13 12:26:10 +02:00
parent b48c5b4921
commit 4c91cf7a6e
5 changed files with 73 additions and 1 deletions

22
proj/perf/test.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/bash
REPEAT=30
CYCLES=50
function test() {
echo $@
for c in $(seq 1 $CYCLES); do
for i in $(seq 1 $REPEAT); do
echo "cycles: $((c * 100)) ($i/$REPEAT)"
$@ $((c * 100))
sleep 1
done
done
}
test ./main
cd ../intercept
test ./intercept -o -i - -- ../perf/main
test ./intercept -o -i stderr -- ../perf/main
test ./intercept -o -i file:out.log -- ../perf/main
#test ./intercept -o -i unix:/ -- ../perf/main