code: func NewWeightedHistogram(n int, alpha float64) *WeightedHistogram {
  	return &WeightedHistogram{
  		bins:    make([]bin, 0),
  		maxbins: n,
  		total:   0,
  		alpha:   alpha,
  	}
  }
docs: // NewWeightedHistogram returns a new WeightedHistogram with a maximum of n bins with a decay factor
  // of alpha.
  //
  // There is no "optimal" bin count, but somewhere between 20 and 80 bins should be
  // sufficient.
  //
  // Alpha should be set to 2 / (N+1), where N represents the average age of the moving window.
  // For example, a 60-second window with an average age of 30 seconds would yield an
  // alpha of 0.064516129.