package sketchpb
import "github.com/DataDog/sketches-go/ddsketch/pb/sketchpb"
THIS IS A GENERATED FILE DO NOT EDIT
Index ¶
- Variables
- type DDSketch
- func (*DDSketch) Descriptor() ([]byte, []int)
- func (x *DDSketch) GetMapping() *IndexMapping
- func (x *DDSketch) GetNegativeValues() *Store
- func (x *DDSketch) GetPositiveValues() *Store
- func (x *DDSketch) GetZeroCount() float64
- func (*DDSketch) ProtoMessage()
- func (x *DDSketch) ProtoReflect() protoreflect.Message
- func (x *DDSketch) Reset()
- func (x *DDSketch) String() string
- type DDSketchBuilder
- func NewDDSketchBuilder(writer io.Writer) *DDSketchBuilder
- func (x *DDSketchBuilder) Reset(writer io.Writer)
- func (x *DDSketchBuilder) SetMapping(cb func(w *IndexMappingBuilder))
- func (x *DDSketchBuilder) SetNegativeValues(cb func(w *StoreBuilder))
- func (x *DDSketchBuilder) SetPositiveValues(cb func(w *StoreBuilder))
- func (x *DDSketchBuilder) SetZeroCount(v float64)
- type IndexMapping
- func (*IndexMapping) Descriptor() ([]byte, []int)
- func (x *IndexMapping) GetGamma() float64
- func (x *IndexMapping) GetIndexOffset() float64
- func (x *IndexMapping) GetInterpolation() IndexMapping_Interpolation
- func (*IndexMapping) ProtoMessage()
- func (x *IndexMapping) ProtoReflect() protoreflect.Message
- func (x *IndexMapping) Reset()
- func (x *IndexMapping) String() string
- type IndexMappingBuilder
- func NewIndexMappingBuilder(writer io.Writer) *IndexMappingBuilder
- func (x *IndexMappingBuilder) Reset(writer io.Writer)
- func (x *IndexMappingBuilder) SetGamma(v float64)
- func (x *IndexMappingBuilder) SetIndexOffset(v float64)
- func (x *IndexMappingBuilder) SetInterpolation(v uint64)
- type IndexMapping_Interpolation
- func (IndexMapping_Interpolation) Descriptor() protoreflect.EnumDescriptor
- func (x IndexMapping_Interpolation) Enum() *IndexMapping_Interpolation
- func (IndexMapping_Interpolation) EnumDescriptor() ([]byte, []int)
- func (x IndexMapping_Interpolation) Number() protoreflect.EnumNumber
- func (x IndexMapping_Interpolation) String() string
- func (IndexMapping_Interpolation) Type() protoreflect.EnumType
- type Store
- func (*Store) Descriptor() ([]byte, []int)
- func (x *Store) GetBinCounts() map[int32]float64
- func (x *Store) GetContiguousBinCounts() []float64
- func (x *Store) GetContiguousBinIndexOffset() int32
- func (*Store) ProtoMessage()
- func (x *Store) ProtoReflect() protoreflect.Message
- func (x *Store) Reset()
- func (x *Store) String() string
- type StoreBuilder
- func NewStoreBuilder(writer io.Writer) *StoreBuilder
- func (x *StoreBuilder) AddBinCounts(cb func(w *Store_BinCountsEntryBuilder))
- func (x *StoreBuilder) AddContiguousBinCounts(v float64)
- func (x *StoreBuilder) Reset(writer io.Writer)
- func (x *StoreBuilder) SetContiguousBinIndexOffset(v int32)
- type Store_BinCountsEntryBuilder
Variables ¶
var ( IndexMapping_Interpolation_name = map[int32]string{ 0: "NONE", 1: "LINEAR", 2: "QUADRATIC", 3: "CUBIC", } IndexMapping_Interpolation_value = map[string]int32{ "NONE": 0, "LINEAR": 1, "QUADRATIC": 2, "CUBIC": 3, } )
Enum value maps for IndexMapping_Interpolation.
var File_ddsketch_proto protoreflect.FileDescriptor
Types ¶
type DDSketch ¶
type DDSketch struct { // The mapping between positive values and the bin indexes they belong to. Mapping *IndexMapping `protobuf:"bytes,1,opt,name=mapping,proto3" json:"mapping,omitempty"` // The store for keeping track of positive values. PositiveValues *Store `protobuf:"bytes,2,opt,name=positiveValues,proto3" json:"positiveValues,omitempty"` // The store for keeping track of negative values. A negative value v is mapped using its positive opposite -v. NegativeValues *Store `protobuf:"bytes,3,opt,name=negativeValues,proto3" json:"negativeValues,omitempty"` // The count for the value zero and its close neighborhood (whose width depends on the mapping). ZeroCount float64 `protobuf:"fixed64,4,opt,name=zeroCount,proto3" json:"zeroCount,omitempty"` // contains filtered or unexported fields }
A DDSketch is essentially a histogram that partitions the range of positive values into an infinite number of indexed bins whose size grows exponentially. It keeps track of the number of values (or possibly floating-point weights) added to each bin. Negative values are partitioned like positive values, symmetrically to zero. The value zero as well as its close neighborhood that would be mapped to extreme bin indexes is mapped to a specific counter.
func (*DDSketch) Descriptor ¶
Deprecated: Use DDSketch.ProtoReflect.Descriptor instead.
func (*DDSketch) GetMapping ¶
func (x *DDSketch) GetMapping() *IndexMapping
func (*DDSketch) GetNegativeValues ¶
func (*DDSketch) GetPositiveValues ¶
func (*DDSketch) GetZeroCount ¶
func (*DDSketch) ProtoMessage ¶
func (*DDSketch) ProtoMessage()
func (*DDSketch) ProtoReflect ¶
func (x *DDSketch) ProtoReflect() protoreflect.Message
func (*DDSketch) Reset ¶
func (x *DDSketch) Reset()
func (*DDSketch) String ¶
type DDSketchBuilder ¶
type DDSketchBuilder struct {
// contains filtered or unexported fields
}
func NewDDSketchBuilder ¶
func NewDDSketchBuilder(writer io.Writer) *DDSketchBuilder
func (*DDSketchBuilder) Reset ¶
func (x *DDSketchBuilder) Reset(writer io.Writer)
func (*DDSketchBuilder) SetMapping ¶
func (x *DDSketchBuilder) SetMapping(cb func(w *IndexMappingBuilder))
func (*DDSketchBuilder) SetNegativeValues ¶
func (x *DDSketchBuilder) SetNegativeValues(cb func(w *StoreBuilder))
func (*DDSketchBuilder) SetPositiveValues ¶
func (x *DDSketchBuilder) SetPositiveValues(cb func(w *StoreBuilder))
func (*DDSketchBuilder) SetZeroCount ¶
func (x *DDSketchBuilder) SetZeroCount(v float64)
type IndexMapping ¶
type IndexMapping struct { // The gamma parameter of the mapping, such that bin index that a value v belongs to is roughly equal to // log(v)/log(gamma). Gamma float64 `protobuf:"fixed64,1,opt,name=gamma,proto3" json:"gamma,omitempty"` // An offset that can be used to shift all bin indexes. IndexOffset float64 `protobuf:"fixed64,2,opt,name=indexOffset,proto3" json:"indexOffset,omitempty"` // To speed up the computation of the index a value belongs to, the computation of the log may be approximated using // the fact that the log to the base 2 of powers of 2 can be computed at a low cost from the binary representation of // the input value. Other values can be approximated by interpolating between successive powers of 2 (linearly, // quadratically or cubically). // NONE means that the log is to be computed exactly (no interpolation). Interpolation IndexMapping_Interpolation `protobuf:"varint,3,opt,name=interpolation,proto3,enum=IndexMapping_Interpolation" json:"interpolation,omitempty"` // contains filtered or unexported fields }
How to map positive values to the bins they belong to.
func (*IndexMapping) Descriptor ¶
func (*IndexMapping) Descriptor() ([]byte, []int)
Deprecated: Use IndexMapping.ProtoReflect.Descriptor instead.
func (*IndexMapping) GetGamma ¶
func (x *IndexMapping) GetGamma() float64
func (*IndexMapping) GetIndexOffset ¶
func (x *IndexMapping) GetIndexOffset() float64
func (*IndexMapping) GetInterpolation ¶
func (x *IndexMapping) GetInterpolation() IndexMapping_Interpolation
func (*IndexMapping) ProtoMessage ¶
func (*IndexMapping) ProtoMessage()
func (*IndexMapping) ProtoReflect ¶
func (x *IndexMapping) ProtoReflect() protoreflect.Message
func (*IndexMapping) Reset ¶
func (x *IndexMapping) Reset()
func (*IndexMapping) String ¶
func (x *IndexMapping) String() string
type IndexMappingBuilder ¶
type IndexMappingBuilder struct {
// contains filtered or unexported fields
}
func NewIndexMappingBuilder ¶
func NewIndexMappingBuilder(writer io.Writer) *IndexMappingBuilder
func (*IndexMappingBuilder) Reset ¶
func (x *IndexMappingBuilder) Reset(writer io.Writer)
func (*IndexMappingBuilder) SetGamma ¶
func (x *IndexMappingBuilder) SetGamma(v float64)
func (*IndexMappingBuilder) SetIndexOffset ¶
func (x *IndexMappingBuilder) SetIndexOffset(v float64)
func (*IndexMappingBuilder) SetInterpolation ¶
func (x *IndexMappingBuilder) SetInterpolation(v uint64)
type IndexMapping_Interpolation ¶
type IndexMapping_Interpolation int32
const ( IndexMapping_NONE IndexMapping_Interpolation = 0 IndexMapping_LINEAR IndexMapping_Interpolation = 1 IndexMapping_QUADRATIC IndexMapping_Interpolation = 2 IndexMapping_CUBIC IndexMapping_Interpolation = 3 )
func (IndexMapping_Interpolation) Descriptor ¶
func (IndexMapping_Interpolation) Descriptor() protoreflect.EnumDescriptor
func (IndexMapping_Interpolation) Enum ¶
func (x IndexMapping_Interpolation) Enum() *IndexMapping_Interpolation
func (IndexMapping_Interpolation) EnumDescriptor ¶
func (IndexMapping_Interpolation) EnumDescriptor() ([]byte, []int)
Deprecated: Use IndexMapping_Interpolation.Descriptor instead.
func (IndexMapping_Interpolation) Number ¶
func (x IndexMapping_Interpolation) Number() protoreflect.EnumNumber
func (IndexMapping_Interpolation) String ¶
func (x IndexMapping_Interpolation) String() string
func (IndexMapping_Interpolation) Type ¶
func (IndexMapping_Interpolation) Type() protoreflect.EnumType
type Store ¶
type Store struct { // The bin counts, encoded sparsely. BinCounts map[int32]float64 `protobuf:"bytes,1,rep,name=binCounts,proto3" json:"binCounts,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` // The bin counts, encoded contiguously. The values of contiguousBinCounts are the counts for the bins of indexes // o, o+1, o+2, etc., where o is contiguousBinIndexOffset. ContiguousBinCounts []float64 `protobuf:"fixed64,2,rep,packed,name=contiguousBinCounts,proto3" json:"contiguousBinCounts,omitempty"` ContiguousBinIndexOffset int32 `protobuf:"zigzag32,3,opt,name=contiguousBinIndexOffset,proto3" json:"contiguousBinIndexOffset,omitempty"` // contains filtered or unexported fields }
A Store maps bin indexes to their respective counts. Counts can be encoded sparsely using binCounts, but also in a contiguous way using contiguousBinCounts and contiguousBinIndexOffset. Given that non-empty bins are in practice usually contiguous or close to one another, the latter contiguous encoding method is usually more efficient than the sparse one. Both encoding methods can be used conjointly. If a bin appears in both the sparse and the contiguous encodings, its count value is the sum of the counts in each encodings.
func (*Store) Descriptor ¶
Deprecated: Use Store.ProtoReflect.Descriptor instead.
func (*Store) GetBinCounts ¶
func (*Store) GetContiguousBinCounts ¶
func (*Store) GetContiguousBinIndexOffset ¶
func (*Store) ProtoMessage ¶
func (*Store) ProtoMessage()
func (*Store) ProtoReflect ¶
func (x *Store) ProtoReflect() protoreflect.Message
func (*Store) Reset ¶
func (x *Store) Reset()
func (*Store) String ¶
type StoreBuilder ¶
type StoreBuilder struct {
// contains filtered or unexported fields
}
func NewStoreBuilder ¶
func NewStoreBuilder(writer io.Writer) *StoreBuilder
func (*StoreBuilder) AddBinCounts ¶
func (x *StoreBuilder) AddBinCounts(cb func(w *Store_BinCountsEntryBuilder))
func (*StoreBuilder) AddContiguousBinCounts ¶
func (x *StoreBuilder) AddContiguousBinCounts(v float64)
func (*StoreBuilder) Reset ¶
func (x *StoreBuilder) Reset(writer io.Writer)
func (*StoreBuilder) SetContiguousBinIndexOffset ¶
func (x *StoreBuilder) SetContiguousBinIndexOffset(v int32)
type Store_BinCountsEntryBuilder ¶
type Store_BinCountsEntryBuilder struct {
// contains filtered or unexported fields
}
func NewStore_BinCountsEntryBuilder ¶
func NewStore_BinCountsEntryBuilder(writer io.Writer) *Store_BinCountsEntryBuilder
func (*Store_BinCountsEntryBuilder) Reset ¶
func (x *Store_BinCountsEntryBuilder) Reset(writer io.Writer)
func (*Store_BinCountsEntryBuilder) SetKey ¶
func (x *Store_BinCountsEntryBuilder) SetKey(v int32)
func (*Store_BinCountsEntryBuilder) SetValue ¶
func (x *Store_BinCountsEntryBuilder) SetValue(v float64)
Source Files ¶
ddsketch.pb.go ddsketch.proto_builder.go
- Version
- v1.4.7 (latest)
- Published
- Feb 19, 2025
- Platform
- js/wasm
- Imports
- 8 packages
- Last checked
- 10 hours ago –
Tools for package owners.