MCPcopy Create free account
hub / github.com/dgraph-io/dgraph / getHistogramBounds

Function getHistogramBounds

dgraph/cmd/debug/run.go:691–697  ·  view source on GitHub ↗

Creates bounds for an histogram. The bounds are powers of two of the form [2^min_exponent, ..., 2^max_exponent].

(minExponent, maxExponent uint32)

Source from the content-addressed store, hash-verified

689// Creates bounds for an histogram. The bounds are powers of two of the form
690// [2^min_exponent, ..., 2^max_exponent].
691func getHistogramBounds(minExponent, maxExponent uint32) []float64 {
692 var bounds []float64
693 for i := minExponent; i <= maxExponent; i++ {
694 bounds = append(bounds, float64(int(1)<<i))
695 }
696 return bounds
697}
698
699// HistogramData stores the information needed to represent the sizes of the keys and values
700// as a histogram.

Callers 1

sizeHistogramFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…