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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UqXYdJKPUFLoeAchjzv3x4
This commit is contained in:
1 parent
8d7cf18277
commit
9e6eb605b3
1 file changed
+7
-1
@@ -124,7 +124,8 @@ int main(int argc, char **argv) {
|
||||
ImageBuffer buffer(buffer_MiB * 1024 * 1024);
|
||||
buffer.StartMeasurement(x);
|
||||
|
||||
std::atomic<int64_t> analysed = 0, indexed = 0;
|
||||
std::atomic<int64_t> analysed = 0, indexed = 0, spots = 0;
|
||||
std::atomic<double> 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<int64_t>(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<int64_t>(1, analysed), after_ready,
|
||||
analysed / after_ready, std::chrono::duration<double>(t1 - t0).count());
|
||||
logger.Info("Per image: {:.1f} ms analysis (one thread), {:.1f} spots",
|
||||
1e3 * processing_s / std::max<int64_t>(1, analysed),
|
||||
static_cast<double>(spots) / std::max<int64_t>(1, analysed));
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
Reference in new issue
Block a user