Move the stats logic in a separate module

4 jobs for master in 1 minute and 18 seconds (queued for 1 second)