px4_work_queue: minor status changes

- only record start time on first run rather than init
 - increase name length
 - round average interval to nearest microsecond
 - basic formatting consistency (google style guide)
This commit is contained in:
Daniel Agar
2020-05-19 12:49:42 -04:00
parent dd9c82eb20
commit 8ee0a5d328
6 changed files with 49 additions and 67 deletions
@@ -390,7 +390,7 @@ WorkQueueManagerStatus()
if (!_wq_manager_should_exit.load() && (_wq_manager_wqs_list != nullptr)) {
const size_t num_wqs = _wq_manager_wqs_list->size();
PX4_INFO_RAW("\nWork Queue: %-1zu threads RATE INTERVAL\n", num_wqs);
PX4_INFO_RAW("\nWork Queue: %-1zu threads RATE INTERVAL\n", num_wqs);
LockGuard lg{_wq_manager_wqs_list->mutex()};
size_t i = 0;
@@ -398,7 +398,7 @@ WorkQueueManagerStatus()
for (WorkQueue *wq : *_wq_manager_wqs_list) {
i++;
const bool last_wq = !(i < num_wqs);
const bool last_wq = (i >= num_wqs);
if (!last_wq) {
PX4_INFO_RAW("|__ %zu) ", i);