Added various histograms for the metrics. (the previous commit had only partial changes).