func getListOfCodecs() (map[string]encoding.Integer, error) { codecs := make(map[string]encoding.Integer, 10) for _, codec := range codecsParam { switch codec { case "bp32": codecs["bp32"] = composition.New(bp32.New(), variablebyte.New()) case "fastpfor": codecs["fastpfor"] = composition.New(fastpfor.New(), variablebyte.New()) case "variablebyte": codecs["variablebyte"] = variablebyte.New() case "deltabp32": codecs["delta bp32"] = composition.New(dbp32.New(), dvb.New()) case "deltafastpfor": codecs["delta fastpfor"] = composition.New(dfastpfor.New(), dvb.New()) case "deltavariablebyte": codecs["delta variablebyte"] = dvb.New() case "zigzagbp32": codecs["zigzag bp32"] = composition.New(zbp32.New(), dvb.New()) case "zigzagfastpfor": codecs["zigzag fastpfor"] = composition.New(zfastpfor.New(), dvb.New()) } } if len(codecs) < 1 { return nil, fmt.Errorf("benchmark/getListOfCodecs: No codecs defined") } return codecs, nil }
func TestBP32andVariableByte(t *testing.T) { sizes := []int{100, 100 * 10, 100 * 100, 100 * 1000, 100 * 10000} benchtools.TestCodec(New(bp32.New(), variablebyte.New()), data, sizes) }