Skip to content

WIP: Added histogramming message service with per message limits.

This message service prevents occasional message floods during the event loop for cases in which one message becomes more frequent than anticipated. Thus, log file sizes are kept within limits and rare messages are not overshadowed by frequent ones.

The goal is achieved by imposing per message limits and by creating a "histogram" with one "bin" per unique message. During finalize the message histogram is dumped to summarise all message types that occurred. By default the histogramming and per-message limit is applied only to messages reported during the event loop. During initialize and finalize message re-occurrence is highly unlikely. Thus, histogramming also such messages only increases the log size when dumping the message histogram, without adding much benefit.

There are two implementations one which adds the histogramming feature to the MessageSvc of sequential Gaudi and the other to the InertMessageSvc of GaudiMT. The message histogramming is handled by a common helper class MessageHistogram.

Messages are distinguished by a hash computed from the first few characters excluding characters used for numbers (decimal and hexadecimal). Incidents are used to switch on the histogramming feature only during the event loop. The common code to extend the MessageSvc and the InertMessageSvc is contained in a common base class template.

The message service can be exercised with the attached options MyAsyncIncidents.py.

Merge request reports