[OpenNMS/opennms] 5f53fc: Perf cleanups

Dino via opennms-cvs <[email protected]> Tue, 28 Jul 2026 14:04:25 -0700
Newsgroups gmane.network.opennms.cvs
Message-ID <OpenNMS/opennms/push/refs/heads/dcy/flow-aggregation/[email protected]>
  Branch: refs/heads/dcy/flow-aggregation
  Home:   https://github.com/OpenNMS/opennms
  Commit: 5f53fcd2cdb06f1fc3659e0d88ca5349221da785
      https://github.com/OpenNMS/opennms/commit/5f53fcd2cdb06f1fc3659e0d88ca5349221da785
  Author: Dino <[email protected]>
  Date:   2026-07-28 (Tue, 28 Jul 2026)

  Changed paths:
    M features/flows/aggregation/src/main/java/org/opennms/netmgt/flows/aggregation/FlowAggregator.java
    M features/flows/aggregation/src/test/java/org/opennms/netmgt/flows/aggregation/FlowAggregatorTest.java

  Log Message:
  -----------
  Perf cleanups

1. Emit off the lock: drainWindowsUpTo/flushIdleWindows now hold the write lock only to evict windows and advance emittedFloor, doing the grouping/top-K/sink in emitAndDeliver(...) outside it — so a big flush no longer blocks ingestion.
2. Bounded top-K: emitWindow uses a size-K min-heap (O(n·log K)) instead of sorting all entries, with identical top-K + "Other" output.
Test: windowEmitRunsOutsideTheEvictionLock asserts (via a wasWriteLockHeldDuringEmit() seam) the lock isn't held during emit.



To unsubscribe from these emails, change your notification settings at https://github.com/OpenNMS/opennms/settings/notifications


_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/wiki/index.php?page=MailingListFaq
opennms-cvs mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-cvs