Class RulesChronoChartRecorder

  • All Implemented Interfaces:
    EventListener, org.kie.api.event.rule.AgendaEventListener

    public class RulesChronoChartRecorder
    extends RulesChronoAgendaEventListener
    Collect live performance statistic for rules (then block) as aggregated result and jfree chart TimeSeries.
    Suitable for prod environment and statistic delivery at the end of the flow or exposing via rest API etc.

    Note: This class creates thread pool executor with single background thread (for all instances) with core pool size 0 (thread will stop if no statistic is gathered).
    Executor holds week reference to the recorder and scheduled periodic statistic gathering will be automatically cancelled when recorder is not in use any more.
    See Also:
    RulesChronoAgendaEventListener, PerfStat
    • Field Detail

      • RETENTION_PERIOD_MIN

        public static final int RETENTION_PERIOD_MIN
      • globalMaxChart

        protected org.jfree.data.time.TimeSeries globalMaxChart
      • globalAvgChart

        protected org.jfree.data.time.TimeSeries globalAvgChart
      • globalMinChart

        protected org.jfree.data.time.TimeSeries globalMinChart
      • retentionPeriodSec

        protected long retentionPeriodSec
    • Constructor Detail

      • RulesChronoChartRecorder

        public RulesChronoChartRecorder()
        Creates RulesChronoChartRecorder with no session prefix and default aggregation period
      • RulesChronoChartRecorder

        public RulesChronoChartRecorder​(long aggregationPeriodMs)
        Creates RulesChronoChartRecorder with no session prefix and provided aggregation period
        Parameters:
        aggregationPeriodMs -