func BenchmarkBPT(b *testing.B) { t := bpt.NewTree() for i := 0; i < b.N; i++ { x := bpt.UUID() t.Set(x, x) } }
func Benchmark_bpt_Set(b *testing.B) { for i := 0; i < b.N; i++ { t := bpt.NewTree() for i := 0; i < size; i++ { t.Set(data[i], data[i]) } } }
func main() { //prof := profile.CPUProfile prof := profile.MemProfile defer profile.Start(prof, profile.ProfilePath(".")).Stop() t := bpt.NewTree() for i := 0; i < 1000000; i++ { x := []byte(fmt.Sprintf("%x", i)) t.Set(x, x) } t.Close() }