mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-07 10:03:23 +09:00
run_matrix.sh drives interleaved monolith/inproc/spawn+shm/spawn+tcp benchmark rounds on an adb device with per-run arm-marker verification; profile_matrix.sh layers simpleperf, ftrace wakeup capture and a /proc sampler on top; make_report.py aggregates runs into REPORT.md. The wifi kit carries the cross-host control-plane hang repro and phone-side strace/fd-reconcile helpers. .trace-work/ (run output) is now ignored.
32 lines
975 B
Bash
32 lines
975 B
Bash
#!/bin/bash
|
|
# Wi-Fi TCP throughput WSL -> phone, 3 reps, sink to /dev/null, nc restarted per rep.
|
|
set -u
|
|
PORT=5213
|
|
for rep in 1 2 3; do
|
|
adb -s 2f7cbe2e shell "pkill -f 'toybox nc' 2>/dev/null; nohup toybox nc -4 -l -p $PORT -q 180 >/dev/null 2>/data/local/tmp/nc.err </dev/null & echo up_$rep"
|
|
sleep 1
|
|
wsl -d Ubuntu -- bash -c "
|
|
python3 - <<'EOF'
|
|
import socket, time
|
|
MIB=1024*1024
|
|
data=b'\0'*MIB
|
|
total=256
|
|
try:
|
|
s=socket.create_connection(('192.168.21.181',$PORT),timeout=10)
|
|
s.setsockopt(socket.SOL_SOCKET, socket.SO_SNDBUF, 4*1024*1024)
|
|
s.settimeout(120)
|
|
t0=time.time(); sent=0
|
|
while sent<total:
|
|
s.sendall(data); sent+=1
|
|
dt=time.time()-t0
|
|
s.shutdown(socket.SHUT_WR); s.close()
|
|
print(f'rep: {sent} MiB in {dt:.3f}s -> {sent/dt:.1f} MiB/s ({sent*8/dt/1000:.0f} Mbps)')
|
|
except Exception as e:
|
|
print(f'rep: FAIL {e}')
|
|
EOF
|
|
"
|
|
adb -s 2f7cbe2e shell "pkill -f 'toybox nc' 2>/dev/null" >/dev/null
|
|
sleep 1
|
|
done
|
|
echo NETBENCH_DONE
|