From 355f30f335769f0e1a60985f54a510a2c9048170 Mon Sep 17 00:00:00 2001 From: DeeJanuz <45082401+DeeJanuz@users.noreply.github.com> Date: Tue, 29 Sep 2026 22:42:24 -0600 Subject: [PATCH] Add a live replay harness for the CPU-placement test fh-ringplay plays a recording into a frame ring in real time, and fh-tracker --ring reads it (cameras without a device node are mapped by name). With the same frames in every run, probes/core_ab.py compares the tracker on CPUs 2-4, on 5-7, and not running, measuring the tracker's step time and latency, the compositor's late frames and CPU/GPU time, XRService's timing warnings, CPU temperature and clocks. Co-Authored-By: Claude Opus 5.5 --- .gitignore | 1 + trackd/Makefile | 7 +- trackd/README.md | 6 ++ trackd/main.cpp | 9 +- trackd/ringplay.cpp | 233 ++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 251 insertions(+), 5 deletions(-) create mode 100644 trackd/ringplay.cpp diff --git a/.gitignore b/.gitignore index 6ab0749..e699c3f 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ camd/fh-camd camd/fh-camprobe trackd/fh-tracker trackd/fh-replay +trackd/fh-ringplay trackd/nettest probes/fh-frametime probes/mgrvt diff --git a/trackd/Makefile b/trackd/Makefile index 1ff735b..23eee00 100644 --- a/trackd/Makefile +++ b/trackd/Makefile @@ -8,7 +8,7 @@ LDLIBS = $(NCNN)/lib/libncnn.a -ljsoncpp -fopenmp -lpthread SRC = main.cpp calib.cpp nets.cpp tracker.cpp io.cpp record.cpp HDR = calib.h geom.h nets.h tracker.h io.h record.h ../camd/fhring.h ../include/fh_hands.h -all: fh-tracker fh-replay +all: fh-tracker fh-replay fh-ringplay fh-tracker: $(SRC) $(HDR) $(CXX) $(CXXFLAGS) -o $@ $(SRC) $(LDLIBS) @@ -16,8 +16,11 @@ fh-tracker: $(SRC) $(HDR) fh-replay: replay.cpp calib.cpp nets.cpp tracker.cpp record.cpp $(HDR) $(CXX) $(CXXFLAGS) -o $@ replay.cpp calib.cpp nets.cpp tracker.cpp record.cpp $(LDLIBS) +fh-ringplay: ringplay.cpp record.h ../camd/fhring.h + $(CXX) $(CXXFLAGS) -o $@ ringplay.cpp + clean: - rm -f fh-tracker fh-replay nettest + rm -f fh-tracker fh-replay fh-ringplay nettest .PHONY: all clean diff --git a/trackd/README.md b/trackd/README.md index 9868f6a..20e928b 100644 --- a/trackd/README.md +++ b/trackd/README.md @@ -21,6 +21,8 @@ Options: - `--no-publish`: don't write the hands file. - `--record DIR`, `--record-for S`: save every frame set for S seconds (default 120) to `DIR/sets.bin`. That's about 80 MB/s. Sending the tracker SIGUSR1 (`pkill -USR1 -x fh-tracker`) starts a recording in `captures/rec-