Adjust stats to new stream workings

This commit is contained in:
2021-01-19 16:57:41 +01:00
parent 53e24c9f1a
commit d3d51d2957
2 changed files with 2 additions and 6 deletions
+1 -2
View File
@@ -12,7 +12,6 @@ class StreamStats {
int image_counter_;
int n_corrupted_images_;
int n_sync_lost_images_;
std::chrono::time_point<std::chrono::steady_clock> stats_interval_start_;
void reset_counters();
@@ -23,7 +22,7 @@ public:
const std::string &stream_name,
const size_t stats_modulo);
void record_stats(const ImageMetadata &meta, const uint32_t n_lost_pulses);
void record_stats(const ImageMetadata &meta);
};
+1 -4
View File
@@ -19,16 +19,14 @@ StreamStats::StreamStats(
void StreamStats::reset_counters()
{
image_counter_ = 0;
n_sync_lost_images_ = 0;
n_corrupted_images_ = 0;
stats_interval_start_ = steady_clock::now();
}
void StreamStats::record_stats(
const ImageMetadata &meta, const uint32_t n_lost_pulses)
const ImageMetadata &meta)
{
image_counter_++;
n_sync_lost_images_ += n_lost_pulses;
if (!meta.is_good_image) {
n_corrupted_images_++;
@@ -56,7 +54,6 @@ void StreamStats::print_stats()
cout << " ";
cout << "n_processed_images=" << image_counter_ << "i";
cout << ",n_corrupted_images=" << n_corrupted_images_ << "i";
cout << ",n_sync_lost_images=" << n_sync_lost_images_ << "i";
cout << ",repetition_rate=" << rep_rate << "i";
cout << " ";
cout << timestamp;