Change writer to JSON consuming

This commit is contained in:
2021-07-06 17:50:01 +02:00
parent b4e19d620d
commit fcafeff6c5
4 changed files with 41 additions and 52 deletions
+3 -9
View File
@@ -5,8 +5,9 @@
using namespace std;
using namespace chrono;
WriterStats::WriterStats(string detector_name) :
detector_name_(std::move(detector_name))
WriterStats::WriterStats(string detector_name, size_t image_n_bytes) :
detector_name_(std::move(detector_name)),
image_n_bytes_(image_n_bytes)
{
reset_counters();
}
@@ -36,13 +37,6 @@ void WriterStats::end_image_write()
max_buffer_write_us_ = max(max_buffer_write_us_, write_us_duration);
}
void WriterStats::start_run(const StoreStream& meta)
{
image_n_bytes_ = (meta.image_y_size *
meta.image_x_size *
meta.bits_per_pixel) / 8;
}
void WriterStats::end_run()
{
print_stats();