mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-04-28 09:02:22 +02:00
Merge branch 'eiger' of https://github.com/paulscherrerinstitute/sf_daq_buffer into eiger
This commit is contained in:
@@ -7,9 +7,9 @@ using namespace chrono;
|
||||
|
||||
AssemblerStats::AssemblerStats(
|
||||
const std::string &detector_name,
|
||||
const size_t stats_modulo) :
|
||||
const size_t stats_time) :
|
||||
detector_name_(detector_name),
|
||||
stats_modulo_(stats_modulo)
|
||||
stats_time_(stats_time)
|
||||
{
|
||||
reset_counters();
|
||||
}
|
||||
@@ -32,7 +32,10 @@ void AssemblerStats::record_stats(
|
||||
n_corrupted_images_++;
|
||||
}
|
||||
|
||||
if (image_counter_ == stats_modulo_) {
|
||||
const auto time_passed = duration_cast<milliseconds>(
|
||||
steady_clock::now()-stats_interval_start_).count();
|
||||
|
||||
if (time_passed >= stats_time_*1000) {
|
||||
print_stats();
|
||||
reset_counters();
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ int main (int argc, char *argv[])
|
||||
sizeof(ImageMetadata), IMAGE_N_BYTES, 1,
|
||||
buffer_config::RAM_BUFFER_N_SLOTS);
|
||||
|
||||
AssemblerStats stats(config.detector_name, ASSEMBLER_STATS_MODULO);
|
||||
AssemblerStats stats(config.detector_name, STATS_TIME);
|
||||
|
||||
|
||||
uint64_t image_id = 0;
|
||||
|
||||
Reference in New Issue
Block a user