Skip to content

Commit

Permalink
Avoid the term 'sparse' where possible
Browse files Browse the repository at this point in the history
This intends to avoid confusing users by the subtle difference between
a native histogram and a sparse bucket.

Signed-off-by: beorn7 <[email protected]>
  • Loading branch information
beorn7 committed Oct 31, 2022
1 parent d31f13b commit e92a8c7
Show file tree
Hide file tree
Showing 3 changed files with 244 additions and 234 deletions.
8 changes: 4 additions & 4 deletions examples/random/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ func main() {
// one bucket to the text of (at most) 1.1. (The precise factor
// is 2^2^-3 = 1.0905077...)
rpcDurationsHistogram = prometheus.NewHistogram(prometheus.HistogramOpts{
Name: "rpc_durations_histogram_seconds",
Help: "RPC latency distributions.",
Buckets: prometheus.LinearBuckets(*normMean-5**normDomain, .5**normDomain, 20),
SparseBucketsFactor: 1.1,
Name: "rpc_durations_histogram_seconds",
Help: "RPC latency distributions.",
Buckets: prometheus.LinearBuckets(*normMean-5**normDomain, .5**normDomain, 20),
NativeHistogramBucketFactor: 1.1,
})
)

Expand Down
Loading

0 comments on commit e92a8c7

Please sign in to comment.