Rename Gorilla into varbit

This commit is contained in:
beorn7 2016-03-23 16:30:41 +01:00
parent 4b574e8a61
commit 865d16f870
6 changed files with 248 additions and 230 deletions

View File

@ -143,7 +143,7 @@ func init() {
)
cfg.fs.Var(
&local.DefaultChunkEncoding, "storage.local.chunk-encoding-version",
"Which chunk encoding version to use for newly created chunks. Currently supported is 0 (delta encoding), 1 (double-delta encoding), and 2 (Gorilla-style encoding).",
"Which chunk encoding version to use for newly created chunks. Currently supported is 0 (delta encoding), 1 (double-delta encoding), and 2 (double-delta encoding with variable bit-width).",
)
// Index cache sizes.
cfg.fs.IntVar(

View File

@ -47,7 +47,7 @@ func (ce *chunkEncoding) Set(s string) error {
case "1":
*ce = doubleDelta
case "2":
*ce = gorilla
*ce = varbit
default:
return fmt.Errorf("invalid chunk encoding: %s", s)
}
@ -57,7 +57,7 @@ func (ce *chunkEncoding) Set(s string) error {
const (
delta chunkEncoding = iota
doubleDelta
gorilla
varbit
)
// chunkDesc contains meta-data for a chunk. Pay special attention to the
@ -370,8 +370,8 @@ func newChunkForEncoding(encoding chunkEncoding) (chunk, error) {
return newDeltaEncodedChunk(d1, d0, true, chunkLen), nil
case doubleDelta:
return newDoubleDeltaEncodedChunk(d1, d0, true, chunkLen), nil
case gorilla:
return newGorillaChunk(gorillaZeroEncoding), nil
case varbit:
return newVarbitChunk(varbitZeroEncoding), nil
default:
return nil, fmt.Errorf("unknown chunk encoding: %v", encoding)
}

View File

@ -1410,6 +1410,10 @@ func BenchmarkAppendType1(b *testing.B) {
benchmarkAppend(b, 1)
}
func BenchmarkAppendType2(b *testing.B) {
benchmarkAppend(b, 2)
}
// Append a large number of random samples and then check if we can get them out
// of the storage alright.
func testFuzz(t *testing.T, encoding chunkEncoding) {

File diff suppressed because it is too large Load Diff