MCPcopy
hub / github.com/uber/aresdb / Set

Method Set

query/common/hll.go:202–215  ·  view source on GitHub ↗

Set sets rho for the specified register index. Caller must ensure that each register is set no more than once.

(index uint16, rho byte)

Source from the content-addressed store, hash-verified

200
201// Set sets rho for the specified register index. Caller must ensure that each register is set no more than once.
202func (hll *HLL) Set(index uint16, rho byte) {
203 hll.NonZeroRegisters++
204
205 if len(hll.DenseData) != 0 {
206 hll.DenseData[index] = rho
207 return
208 }
209
210 hll.SparseData = append(hll.SparseData, HLLRegister{index, rho})
211
212 if hll.NonZeroRegisters*4 >= 1<<hllP {
213 hll.ConvertToDense()
214 }
215}
216
217func parseOldTimeseriesHLLResult(buffer []byte, ignoreEnum bool) (AQLQueryResult, error) {
218 // empty result buffer

Callers 15

NoCacheFunction · 0.45
http_test.goFile · 0.45
TestEnumMutatorFunction · 0.45
TestSchemaMutatorFunction · 0.45
TestJobMutatorFunction · 0.45
TestNamespaceMutatorFunction · 0.45
flushResultBufferMethod · 0.45
hll_test.goFile · 0.45
postProcessMethod · 0.45

Calls 1

ConvertToDenseMethod · 0.95

Tested by 6

TestEnumMutatorFunction · 0.36
TestSchemaMutatorFunction · 0.36
TestJobMutatorFunction · 0.36
TestNamespaceMutatorFunction · 0.36