Skip to content

Commit

Permalink
logger: restore buffer statistics update
Browse files Browse the repository at this point in the history
 - this was accidentally dropped during a rebase of #14050
  • Loading branch information
dagar authored Feb 10, 2020
1 parent e6d7612 commit 2015cc2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/modules/logger/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 2015cc2

Please sign in to comment.