`import "cloud.google.com/go/pubsub/internal/distribution"`

❖

```
type D struct {
// contains filtered or unexported fields
}
```

D is a distribution. Methods of D can be called concurrently by multiple goroutines.

New creates a new distribution capable of holding values from 0 to n-1.

Percentile computes the p-th percentile of the distribution where p is between 0 and 1. This method may be called by multiple goroutines.

Record records value v to the distribution. To help with distributions with long tails, if v is larger than the maximum value, Record records the maximum value instead. If v is negative, Record panics.

Package distribution imports 5 packages (graph) and is imported by 1 packages. Updated 2019-09-19. Refresh now. Tools for package owners.