Documentation
¶
Index ¶
- Constants
- Variables
- func AllocSlice[T allocItem](data []T, size int) ([]T, []T)
- func Bool2Byte(b bool) byte
- func Bool2Int64(b bool) int64
- func Bool2str(b bool) string
- func BooleanSlice2byte(b []bool) []byte
- func Bytes2BooleanSlice(b []byte) []bool
- func Bytes2Float32Slice(b []byte) []float32
- func Bytes2Float64Slice(b []byte) []float64
- func Bytes2Int16Slice(b []byte) []int16
- func Bytes2Int32Slice(b []byte) []int32
- func Bytes2Int64Slice(b []byte) []int64
- func Bytes2Int8Slice(b []byte) []int8
- func Bytes2Uint16Slice(b []byte) []uint16
- func Bytes2Uint32Slice(b []byte) []uint32
- func Bytes2Uint64Slice(b []byte) []uint64
- func Bytes2Value[T any](b []byte, v *T)
- func Bytes2str(b []byte) string
- func CeilToPower2(num uint64) uint64
- func ClearingWhileReading(startTier, endTier uint64) bool
- func DivisionCeil(dividend, divisor int) int
- func FindIntersectionIndex[T1, T2 any](slice1 []T1, slice2 []T2, compareFunc func(T1, T2) int, ...) error
- func Float32Slice2byte(b []float32) []byte
- func Float64Slice2byte(b []float64) []byte
- func Float64ToUint64(v float64) uint64
- func Include(slice []uint64, s uint64) bool
- func IndexOf(slice []uint64, s uint64) int
- func Int16Slice2byte(b []int16) []byte
- func Int32Slice2byte(b []int32) []byte
- func Int64Slice2byte(b []int64) []byte
- func IntLimit(min, max int, v int) int
- func IntersectSortedSliceInt(slice1, slice2 []int) []int
- func IsHot(tier uint64) bool
- func IsInternalDatabase(dbName string) bool
- func IsObjectNil(obj interface{}) bool
- func Max[T NumberInt](x, y T) T
- func MaxUint32(x, y uint32) uint32
- func Median[T NumberOnly](data []T) (float64, error)
- func MemorySet(buf []byte, val byte)
- func Min(x, y int) int
- func MinUint32(x, y uint32) uint32
- func MustClose(obj io.Closer)
- func MustRun(fn func() error)
- func NumberOfTrailingZeros(num uint64) int
- func OpenPprofServer(host, port string)
- func PaddingZeroBuffer(out []byte, size int) []byte
- func Quantile[T NumberOnly](data []T, q float64) (float64, error)
- func Search(begin, n int, f func(int) bool) int
- func SetLogger(lg *zap.Logger)
- func SetTopoManagerUrl(topoManagerUrl string)
- func SliceSplitFunc[E any](s []E, filter func(*E) bool) ([]E, []E)
- func Str2bytes(s string) []byte
- func TickerRun(d time.Duration, stopSignal <-chan struct{}, onTick func(), onStop func())
- func TimeCost(option string) func()
- func TrimMean[T NumberOnly](data []T, proportionToCut float64) (float64, error)
- func Uint16Slice2byte(b []uint16) []byte
- func Uint32Slice2byte(b []uint32) []byte
- func Uint64Slice2byte(b []uint64) []byte
- func Uint64ToFloat64(v uint64) float64
- func UnionSortedSliceInt(slice1, slice2 []int) []int
- func WaitTimeOut(wait func(), done func(), timeout time.Duration)
- type BasicType
- type Client
- type ConcurrentRunner
- type Config
- type ExceptBool
- type ExceptString
- type Item
- type NumberInt
- type NumberOnly
- type Param
- type Processor
- type Queue
- type Reference
- type Signal
- type SyncMap
- type TimeRange
- type TimerPool
Constants ¶
const ( DefaultPprofHost = "127.0.0.1" StorePprofPort = "6060" SqlPprofPort = "6061" MetaPprofPort = "6062" )
const ( TierBegin = 0 Hot = 1 Warm = 2 Cold = 3 Moving = 4 Cleared = 5 NoClear = 6 Clearing = 7 TierEnd = 8 True = "true" False = "false" PrecisionThreshold = 1e-9 )
const ( BooleanSizeBytes = int(unsafe.Sizeof(false)) Uint32SizeBytes = int(unsafe.Sizeof(uint32(0))) Uint16SizeBytes = int(unsafe.Sizeof(uint16(0))) Uint64SizeBytes = int(unsafe.Sizeof(uint64(0))) Int16SizeBytes = int(unsafe.Sizeof(int16(0))) Int32SizeBytes = int(unsafe.Sizeof(int32(0))) Int64SizeBytes = int(unsafe.Sizeof(int64(0))) Float32SizeBytes = int(unsafe.Sizeof(float32(0))) Float64SizeBytes = int(unsafe.Sizeof(float64(0))) Int8SizeBytes = int(unsafe.Sizeof(int8(0))) RowsNumPerFragment int = 8192 DefaultMaxRowsPerSegment4TsStore = 1000 DefaultMaxRowsPerSegment4ColStore = RowsNumPerFragment // should be the same as RowsNumPerFragment@colstore DefaultMaxSegmentLimit4ColStore = 256 * 1024 DefaultMaxChunkMetaItemSize = 256 * 1024 DefaultMaxChunkMetaItemCount = 512 CompressModMaxChunkMetaItemCount = 16 NonStreamingCompact = 2 StreamingCompact = 1 AutoCompact = 0 DefaultExpectedSegmentSize uint32 = 8 * 1024 * 1024 DefaultFileSizeLimit = 8 * 1024 * 1024 * 1024 DefaultEntryLogSizeLimit = 20 * 1024 * 1024 * 1024 MaxMeasurementLengthWithVersion = 255 // eg, version is:_0000 MeasurementVersionLength = 5 // the measurement name length should consider MeasurementVersionLength MaxMeasurementLength = MaxMeasurementLengthWithVersion - MeasurementVersionLength MaxTagNameLength = 255 MaxTagValueLength = 64 * 1024 MaxFieldNameLength = 255 )
Variables ¶
Functions ¶
func AllocSlice ¶ added in v1.1.0
func AllocSlice[T allocItem](data []T, size int) ([]T, []T)
func Bool2Int64 ¶ added in v1.5.0
func BooleanSlice2byte ¶ added in v1.1.0
func Bytes2BooleanSlice ¶ added in v1.1.0
func Bytes2Float32Slice ¶ added in v1.1.0
func Bytes2Float64Slice ¶ added in v1.1.0
func Bytes2Int16Slice ¶ added in v1.1.0
func Bytes2Int32Slice ¶ added in v1.1.0
func Bytes2Int64Slice ¶ added in v1.1.0
func Bytes2Int8Slice ¶ added in v1.1.0
func Bytes2Uint16Slice ¶ added in v1.1.0
func Bytes2Uint32Slice ¶ added in v1.1.0
func Bytes2Uint64Slice ¶ added in v1.1.0
func Bytes2Value ¶ added in v1.5.0
func CeilToPower2 ¶ added in v0.2.0
func ClearingWhileReading ¶ added in v1.5.0
func DivisionCeil ¶ added in v1.3.0
func FindIntersectionIndex ¶ added in v1.5.0
func FindIntersectionIndex[T1, T2 any](slice1 []T1, slice2 []T2, compareFunc func(T1, T2) int, callbackFunc func(i, j int) error) error
FindIntersectionIndex finds the intersection indices of two sorted slices based on a custom comparison function.
func Float32Slice2byte ¶ added in v1.1.0
func Float64Slice2byte ¶ added in v1.1.0
func Float64ToUint64 ¶ added in v1.1.0
func IndexOf ¶ added in v1.0.0
IndexOf returns index position in slice from given array If value is -1, the string does not found.
func Int16Slice2byte ¶ added in v1.1.0
func Int32Slice2byte ¶ added in v1.1.0
func Int64Slice2byte ¶ added in v1.1.0
func IntersectSortedSliceInt ¶ added in v1.4.0
func IsInternalDatabase ¶ added in v1.5.0
IsInternalDatabase returns true if the database is "_internal".
func IsObjectNil ¶
func IsObjectNil(obj interface{}) bool
func Median ¶ added in v1.5.0
func Median[T NumberOnly](data []T) (float64, error)
Median calculates the median value of a numeric slice. It returns the median as a float64 and an error if the input slice is empty.
Note: This implementation uses the QuickSelect algorithm, which modifies the order of elements in the input slice during execution (through in-place partitioning). The original element positions will not be preserved.
The median is defined as: - For an odd-length slice: the middle element when the slice is sorted. - For an even-length slice: the average of the two middle elements when sorted.
QuickSelect is used here for efficient median calculation (average O(n) time complexity) without full sorting, making it suitable for large datasets.
func NumberOfTrailingZeros ¶ added in v1.1.0
func OpenPprofServer ¶ added in v1.3.0
func OpenPprofServer(host, port string)
func PaddingZeroBuffer ¶ added in v1.3.0
func Quantile ¶ added in v1.5.0
func Quantile[T NumberOnly](data []T, q float64) (float64, error)
Quantile computes the empirical quantile of a dataset using linear interpolation, consistent with the behavior of numpy.quantile (method="linear").
Note: This implementation uses the QuickSelect algorithm, which modifies the order of elements in the input slice during execution (through in-place partitioning). The original element positions will not be preserved.
func SetTopoManagerUrl ¶ added in v1.5.0
func SetTopoManagerUrl(topoManagerUrl string)
func SliceSplitFunc ¶ added in v1.4.0
func TrimMean ¶ added in v1.5.0
func TrimMean[T NumberOnly](data []T, proportionToCut float64) (float64, error)
TrimMean calculates the trimmed mean of a numeric slice by removing a specified proportion of elements from both the lower and upper ends, then averaging the remaining elements.
Note: This implementation uses the QuickSelect algorithm, which modifies the order of elements in the input slice during execution (through in-place partitioning). The original element positions will not be preserved.
func Uint16Slice2byte ¶ added in v1.1.0
func Uint32Slice2byte ¶ added in v1.1.0
func Uint64Slice2byte ¶ added in v1.1.0
func Uint64ToFloat64 ¶ added in v1.1.0
func UnionSortedSliceInt ¶ added in v1.4.0
func WaitTimeOut ¶ added in v1.5.0
Types ¶
type Client ¶ added in v1.5.0
type Client struct {
Conf Config
}
func GetClientConf ¶ added in v1.5.0
func GetClientConf() *Client
type ConcurrentRunner ¶ added in v1.4.0
type ConcurrentRunner[T any] struct { // contains filtered or unexported fields }
func NewConcurrentRunner ¶ added in v1.4.0
func NewConcurrentRunner[T any](queues []*Queue[T], processors []Processor) *ConcurrentRunner[T]
func (*ConcurrentRunner[T]) Close ¶ added in v1.4.0
func (runner *ConcurrentRunner[T]) Close()
Close called after Stop
func (*ConcurrentRunner[T]) Schedule ¶ added in v1.4.0
func (runner *ConcurrentRunner[T]) Schedule(hash uint64, v *T)
func (*ConcurrentRunner[T]) Size ¶ added in v1.4.0
func (runner *ConcurrentRunner[T]) Size() int
func (*ConcurrentRunner[T]) Stop ¶ added in v1.4.0
func (runner *ConcurrentRunner[T]) Stop()
type ExceptBool ¶ added in v1.3.0
type ExceptString ¶ added in v1.3.0
type NumberOnly ¶ added in v1.3.0
type Processor ¶ added in v1.4.0
type Processor interface {
Run()
// Stop called before Close
Stop()
Close()
}
type Reference ¶ added in v1.4.0
type Reference struct {
// contains filtered or unexported fields
}
type SyncMap ¶ added in v1.5.0
type SyncMap[K comparable, V any] struct { // contains filtered or unexported fields }
func NewSyncMap ¶ added in v1.5.0
func NewSyncMap[K comparable, V any]() *SyncMap[K, V]
func (*SyncMap[K, V]) LoadOrStore ¶ added in v1.5.0
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
lifted
|
|
|
bytebufferpool
Package bytebufferpool implements a pool of byte buffers with anti-fragmentation protection.
|
Package bytebufferpool implements a pool of byte buffers with anti-fragmentation protection. |
|
encoding/simple8b
Package simple8b implements the 64bit integer encoding algoritm as published by Ann and Moffat in "Index compression using 64-bit words", Softw.
|
Package simple8b implements the 64bit integer encoding algoritm as published by Ann and Moffat in "Index compression using 64-bit words", Softw. |
|
go-bitstream
Package bitstream is a simple wrapper around a io.Reader and io.Writer to provide bit-level access to the stream.
|
Package bitstream is a simple wrapper around a io.Reader and io.Writer to provide bit-level access to the stream. |
|
hashicorp/serf/testutil/retry
Package retry provides support for repeating operations in tests.
|
Package retry provides support for repeating operations in tests. |