24 std::vector<TimerSpec> timers{{
TimerSpec{2000000000, 10},
27 std::vector<InputSpec> inputs = {{{
"timer"},
"TST",
"TIMER", 0, Lifetime::Timer,
timerSpecs(timers)}};
36 LOGP(info,
"Processing callback invoked");
39 static int64_t counterA = 0;
40 static int64_t
start = uv_hrtime();
41 int64_t lastTime = uv_hrtime();
42 auto elapsed = lastTime -
start;
44 LOGP(info,
"Elapsed time: {} ns", elapsed);
45 if ((lastTime -
start) < 10000000000) {
47 if (diff > 100000000) {
48 LOGP(fatal,
"2s timer is not accurate enough: {}, count {}", diff,
counter);
54 LOGP(fatal,
"2s timer did not do all the expected iterations {} != 5", counterA);
56 int64_t diff = 2000000000LL * 5 + 1000000000 * (
counter - 5) - (lastTime -
start);
57 if (diff > 10000000) {
58 LOGP(fatal,
"1s timer is not accurate enough: {}, count ", diff,
counter);
62 LOGP(info,
"Counter: {}",
counter);
void readyToQuit(bool all)
Compatibility with old API.
decltype(auto) make(const Output &spec, Args... args)
Defining PrimaryVertex explicitly as messageable.
std::vector< DataProcessorSpec > WorkflowSpec
AlgorithmSpec::ProcessCallback adaptStateless(LAMBDA l)
std::vector< ConfigParamSpec > timerSpecs(std::vector< TimerSpec > intervals)
WorkflowSpec defineDataProcessing(ConfigContext const &ctx)
This function hooks up the the workflow specifications into the DPL driver.