Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 1.62 KB

File metadata and controls

50 lines (36 loc) · 1.62 KB

AdvancedStatCounterTask

Logs performance statistics (info level) every N executions: time since the last log, processing rate, number of processed items and total elapsed time. The input is passed to the output, so the task can be placed anywhere in a branch.

Task reference

  • Service: CleverAge\ProcessBundle\Task\Reporting\AdvancedStatCounterTask

Accepted inputs

any: only the number of executions matters.

Possible outputs

any: the input, unchanged, on every execution (whether statistics are logged or not).

The logged message has the following format:

Last iteration 00:00:12 ago - 1,50 items/s - 500 items processed in 00:05:33

Options

Code Type Required Default Description
num_items int 1 Number of items represented by one execution (multiplier of the counter)
skip_first int 0 Number of first executions to ignore (the elapsed time still starts at the first one)
show_every int 1 Log the statistics every N counted executions (the N-th, 2N-th, ...)

Examples

  • Log statistics every 100 batches of 50 items
# Task configuration level
stats:
  service: '@CleverAge\ProcessBundle\Task\Reporting\AdvancedStatCounterTask'
  options:
    num_items: 50
    show_every: 100