Class ToolIndexStatsReporter
java.lang.Object
ai.attackframework.tools.burp.sinks.ToolIndexStatsReporter
Periodically pushes a stats snapshot document to the tool index
(
IndexNaming.INDEX_PREFIX) for resource and export metrics in OpenSearch.
Started when export startup reaches the tool-stats phase; runs on a daemon thread.
Only pushes when export is running and RuntimeConfig.openSearchUrl() is set.
Fire-and-forget; failures are not pushed back to the tool index to avoid feedback loops.
Set ENABLED to false to disable the reporter (e.g. to test
whether periodic OpenSearch pushes contribute to memory growth).
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanWhen false, no scheduler is started and no documents are pushed. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidPushes one stats snapshot immediately so the tool index can reflect the current runtime state without waiting for the next interval.static voidstart()Starts the periodic stats reporter if not already running.static voidstop()Stops the periodic stats scheduler.
-
Field Details
-
ENABLED
public static final boolean ENABLEDWhen false, no scheduler is started and no documents are pushed.- See Also:
-
-
Method Details
-
pushSnapshotNow
public static void pushSnapshotNow()Pushes one stats snapshot immediately so the tool index can reflect the current runtime state without waiting for the next interval.Safe to call from any thread. No-op if export is not running or no sink is enabled.
-
start
public static void start()Starts the periodic stats reporter if not already running.Safe to call from any thread. Uses a single daemon scheduler. No-op if
ENABLEDis false. -
stop
public static void stop()Stops the periodic stats scheduler.Safe to call from any thread. The next
start()call creates a fresh scheduler.
-