export { global expire_worker_stats: function(t: table[addr] of count, idx: addr): interval ; global worker_stats: table[addr] of count &create_expire=5 secs &expire_func=expire_worker_stats ; } function expire_worker_stats(t: table[addr] of count, idx: addr): interval { print fmt("expire_worker_stats: 0 secs: %s", t[idx]); ### comment it out for normal run #return 0 secs; } event connection_state_remove(c: connection) { local orig = c$id$orig_h ; if (orig !in worker_stats) { worker_stats[orig] = 0 ; } worker_stats[orig] += 1 ; }