Adding write of commit histograms to mongodb