Class FileExportStats
java.lang.Object
ai.attackframework.tools.burp.utils.FileExportStats
Thread-safe session stats for file-based exports.
These counters mirror the high-level OpenSearch export metrics used by StatsPanel,
but track only documents and bytes that were actually written to file sinks.
-
Method Summary
Modifier and TypeMethodDescriptionstatic longgetExportedBytes(String indexKey) Returns the successful file-export bytes recorded for an index key.static longgetFailureCount(String indexKey) Returns the failed file-export document count for an index key.Returns the tracked short index keys used by file-export stats.static StringgetLastError(String indexKey) Returns the latest file-export error for an index key, ornull.static longgetLastWriteDurationMs(String indexKey) Returns the latest successful file-write duration for an index key, or-1.static longgetSuccessCount(String indexKey) Returns the successful file-export document count for an index key.static longReturns the total successful file-export bytes across all tracked indexes.static longReturns the total failed file-export document count across all tracked indexes.static longReturns the total successful file-export document count across all tracked indexes.static longgetTrafficSourceFailureCount(String sourceKey) Returns the failed file-export count for a traffic source key.static longgetTrafficSourceSuccessCount(String sourceKey) Returns the successful file-export count for a traffic source key.static longgetTrafficToolTypeCapturedCount(String toolTypeKey) Returns the captured file-export traffic count for one tool type.Returns the tracked traffic tool-type keys used by file-export source stats.static voidrecordExportedBytes(String indexKey, long bytes) Records successfully written file-export bytes for an index key.static voidrecordFailure(String indexKey, long count) Records one or more failed file-export write attempts for an index key.static voidrecordLastError(String indexKey, String message) Stores the latest file-export error for an index key, truncating overly long messages.static voidrecordLastWriteDurationMs(String indexKey, long durationMs) Records the wall-clock duration of the latest successful file write for an index key.static voidrecordSuccess(String indexKey, long count) Records one or more successful file-export document writes for an index key.static voidrecordTrafficSourceFailure(String sourceKey, long count) Records one or more failed traffic document writes for a file-export source key.static voidrecordTrafficSourceSuccess(String sourceKey, long count) Records one or more successful traffic document writes for a file-export source key.static voidrecordTrafficToolTypeCaptured(String toolTypeKey, long count) Records captured traffic tool-type counts for file-exported traffic documents.static voidResets all file-export stats.
-
Method Details
-
getIndexKeys
Returns the tracked short index keys used by file-export stats. -
getTrafficToolTypeKeys
Returns the tracked traffic tool-type keys used by file-export source stats. -
recordSuccess
Records one or more successful file-export document writes for an index key. -
recordFailure
Records one or more failed file-export write attempts for an index key. -
recordExportedBytes
Records successfully written file-export bytes for an index key. -
recordLastWriteDurationMs
Records the wall-clock duration of the latest successful file write for an index key. -
recordLastError
Stores the latest file-export error for an index key, truncating overly long messages. -
getSuccessCount
Returns the successful file-export document count for an index key. -
getFailureCount
Returns the failed file-export document count for an index key. -
getExportedBytes
Returns the successful file-export bytes recorded for an index key. -
getLastWriteDurationMs
Returns the latest successful file-write duration for an index key, or-1. -
getLastError
Returns the latest file-export error for an index key, ornull. -
getTotalSuccessCount
public static long getTotalSuccessCount()Returns the total successful file-export document count across all tracked indexes. -
getTotalFailureCount
public static long getTotalFailureCount()Returns the total failed file-export document count across all tracked indexes. -
getTotalExportedBytes
public static long getTotalExportedBytes()Returns the total successful file-export bytes across all tracked indexes. -
recordTrafficSourceSuccess
Records one or more successful traffic document writes for a file-export source key. -
recordTrafficSourceFailure
Records one or more failed traffic document writes for a file-export source key. -
getTrafficSourceSuccessCount
Returns the successful file-export count for a traffic source key. -
getTrafficSourceFailureCount
Returns the failed file-export count for a traffic source key. -
recordTrafficToolTypeCaptured
Records captured traffic tool-type counts for file-exported traffic documents. -
getTrafficToolTypeCapturedCount
Returns the captured file-export traffic count for one tool type. -
resetForTests
public static void resetForTests()Resets all file-export stats. Intended for tests and process-local lifecycle cleanup.
-