benchmark
Logs throughput statistics for processed messages, and provides a summary of those statistics over the lifetime of the processor.
The processor records rolling performance metrics, such as messages per second and optionally bytes per second, at a configurable interval as messages pass through. When the processor shuts down it emits summary statistics covering its entire lifetime.
# Config fields, showing default values
processor:
label: ""
benchmark:
count_bytes: true
interval: 5s
Examples
- Log throughput
- Summary only
Emit rolling throughput statistics every five seconds while messages pass through the pipeline.
processor:
benchmark:
interval: 5s
count_bytes: true
Disable rolling statistics and byte counting, logging only the lifetime summary when the processor shuts down.
processor:
benchmark:
interval: 0
count_bytes: false
Fields
count_bytes
Whether to measure the number of bytes per second of throughput. If set to true, structured data must be serialized in order to count the number of bytes processed, which can unnecessarily degrade performance if serialization is not required elsewhere in your pipeline.
Type: bool
Default: true
interval
How often to emit rolling statistics. Set to 0 if you only want to log summary statistics when the processor shuts down.
Type: string
Default: "5s"