High-water mark for a queue

cmcqueen1975 wrote on Friday, March 22, 2019:

I’d like to use xQueueSendToBackFromISR(). That function can’t block, but just fails if the queue is full. So for correct operation, I need to set the queue size so it will never be full under load.

Is there some way to measure a queue’s “high water mark”, ie the maximum number of items that have been in the queue at once, a bit like what can be done for a task stack?

Craig McQueen

rtel wrote on Friday, March 22, 2019:

No, but that sounds like a good enhancement that would enable people to
tune their systems. You can query how many spaces their are in a queue,
but not the minimum there have ever been.

You can see queue lengths over time in Tracealyzer , using the Object Utilization view. It won’t tell you the true worst case, but with streaming you can monitor your system over long periods and get fairly good confidence in the results.
(Note: I work for Percepio so somewhat biased here…)