Codebase list golang-github-go-kit-kit / e553b8e
metrics: safety check in test stat population Peter Bourgon 8 years ago
1 changed file(s) with 3 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
1717 rand.Seed(seed)
1818 for i := 0; i < population; i++ {
1919 sample := int64(rand.NormFloat64()*float64(stdev) + float64(mean))
20 if sample < 0 {
21 sample = 0
22 }
2023 h.Observe(sample)
2124 }
2225 }