logger: restore buffer statistics update

- this was accidentally dropped during a rebase of #14050
This commit is contained in:
Daniel Agar 2020-02-10 00:17:28 -05:00 committed by GitHub
parent e6d7612997
commit 2015cc2b39

View File

@ -785,6 +785,13 @@ void Logger::run()
_last_sync_time = loop_time;
}
// update buffer statistics
for (int i = 0; i < (int)LogType::Count; ++i) {
if (!_statistics[i].dropout_start && (_writer.get_buffer_fill_count_file((LogType)i) > _statistics[i].high_water)) {
_statistics[i].high_water = _writer.get_buffer_fill_count_file((LogType)i);
}
}
// publish logger status
if (hrt_elapsed_time(&_logger_status_last) >= 1_s) {
for (int i = 0; i < (int)LogType::Count; ++i) {