func()

in sample-apps/prometheus-sample-app/metrics/metrics_collector.go [52:61]


func (mc *metricCollector) updateHistogram() {
	for idx := 0; idx < len(mc.histograms); idx++ {
		for i := 0; i < mc.datapointCount; i++ {
			labels := datapointLabels(i, mc.labelKeys, mc.labelValues)
			// generate fictional values for histogram with random normal distribution
			v := (rand.NormFloat64() * *normDomain) + *normMean
			mc.histograms[idx].With(labels).Observe(v)
		}
	}
}