From 9e6eb605b3cae748db6a17699e1b140e18b8d24e Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Tue, 3 Nov 2026 19:59:11 +0100 Subject: [PATCH] Stills GPU replay: report the per-image analysis time and spot count The rate after the pre-pass is the rate the frames are read at whenever the input is slower than the analysis; the mean processing_time_s of the frames (one thread) and their mean spot count say what the analysis itself costs. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01UqXYdJKPUFLoeAchjzv3x4 --- tools/jfjoch_stills_gpu_replay.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/jfjoch_stills_gpu_replay.cpp b/tools/jfjoch_stills_gpu_replay.cpp index a251b9870..459e56272 100644 --- a/tools/jfjoch_stills_gpu_replay.cpp +++ b/tools/jfjoch_stills_gpu_replay.cpp @@ -124,7 +124,8 @@ int main(int argc, char **argv) { ImageBuffer buffer(buffer_MiB * 1024 * 1024); buffer.StartMeasurement(x); - std::atomic analysed = 0, indexed = 0; + std::atomic analysed = 0, indexed = 0, spots = 0; + std::atomic processing_s = 0.0; std::chrono::steady_clock::time_point t_ready; const auto t0 = std::chrono::steady_clock::now(); { @@ -140,6 +141,8 @@ int main(int argc, char **argv) { }, [&](DataMessage &m, const AzimuthalIntegrationProfile &) { ++analysed; + spots += static_cast(m.spots.size()); + processing_s += m.processing_time_s.value_or(0.0f); if (m.indexing_result.value_or(false)) ++indexed; }, @@ -172,5 +175,8 @@ int main(int argc, char **argv) { logger.Info("Analysed {} images, {} indexed ({:.1f}%); {:.1f} s after the pre-pass = {:.1f} Hz; total {:.1f} s", analysed.load(), indexed.load(), 100.0 * indexed / std::max(1, analysed), after_ready, analysed / after_ready, std::chrono::duration(t1 - t0).count()); + logger.Info("Per image: {:.1f} ms analysis (one thread), {:.1f} spots", + 1e3 * processing_s / std::max(1, analysed), + static_cast(spots) / std::max(1, analysed)); return EXIT_SUCCESS; }