Skip to content

Commit

Permalink
Improve messages
Browse files Browse the repository at this point in the history
  • Loading branch information
zhujun98 committed Sep 26, 2023
1 parent d0d0633 commit 4438221
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion recon/include/recon/daq/zmq_daq_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class ZmqDaqClient : public DaqClientInterface {
public:

static constexpr size_t K_BUFFER_SIZE = 1000;
static constexpr size_t K_MONITOR_EVERY = 100;
static constexpr size_t K_MONITOR_EVERY = 1000;

protected:

Expand Down
9 changes: 7 additions & 2 deletions recon/src/monitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ void Monitor::countFlat() {
void Monitor::countTomogram() {
++num_tomograms_;

#if (VERBOSITY >= 1)
spdlog::info("{} tomograms reconstructed", num_tomograms_);
#endif

#if (VERBOSITY >= 2)
if (num_tomograms_ % report_tomo_throughput_every_ == 0) {
// The number for the first <report_tomo_throughput_every_> tomograms
// underestimates the throughput!
Expand All @@ -57,11 +62,11 @@ void Monitor::countTomogram() {
end - tomo_start_).count();
double throughput = scan_byte_size_ * report_tomo_throughput_every_ / dt;
double throughput_per_tomo = 1000000. * report_tomo_throughput_every_ / dt;
spdlog::info("{} tomograms reconstructed", num_tomograms_);
spdlog::info("[Bench] Throughput (averaged over the last {} tomograms): {:.1f} (MB/s) / {:.1f} (tomo/s)",
spdlog::info("Throughput (averaged over the last {} tomograms): {:.1f} (MB/s) / {:.1f} (tomo/s)",
report_tomo_throughput_every_, throughput, throughput_per_tomo);
tomo_start_ = end;
}
#endif
}

void Monitor::summarize() const {
Expand Down

0 comments on commit 4438221

Please sign in to comment.