Prevent flooding by batching metrics at 20000

Change-Id: Id8cbb5a56ab126f3516b3f514bfcc33650fb1196