MCPcopy Index your code
hub / github.com/dgraph-io/dgraph / NewHistogramData

Function NewHistogramData

dgraph/cmd/debug/run.go:711–718  ·  view source on GitHub ↗

NewHistogramData returns a new instance of HistogramData with properly initialized fields.

(bounds []float64)

Source from the content-addressed store, hash-verified

709
710// NewHistogramData returns a new instance of HistogramData with properly initialized fields.
711func NewHistogramData(bounds []float64) *HistogramData {
712 return &HistogramData{
713 Bounds: bounds,
714 CountPerBucket: make([]int64, len(bounds)+1),
715 Max: 0,
716 Min: math.MaxInt64,
717 }
718}
719
720// Update changes the Min and Max fields if value is less than or greater than the current values.
721func (histogram *HistogramData) Update(value int64) {

Callers 1

sizeHistogramFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected