How to know the length of time a particular event spends in an event queue with statistics?

How to know the length of time a particular event spends in an event queue with statistics?

Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    From my checking, the time has also be reset when it is reused.

    Therefore, it is reset before adding to the event queue.

    Have you seen any unexpected behavior when using this method?

    This is the only public method used to retrieve event age.image

    image

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @hamza.khalid

    You can call the Event::getEventAge() which returns time in milliseconds, elapsed since the event was created. To use this method, you need to set the enableOMMEventAge configuration parameter to true.

    image

    image

  • @hamza.khalid

    If you wish to use getEventAge, please also note that using event.getEventAge() on a cloned event is not supported.

  • Hi,
    jirapongse.phuriphanvichai
    Thank you guys for your comment. I know about eventAge function, but, it gives you time elapsed since the event happened. I need the length of time for which the event is in the event queue. In the EventQueue with Statistics part of documentation it's written that this functionality can be used to retrieve the length of time the events have been queued.