do one database commit per batch of metrics record