Exemple #1
0
func BenchmarkTidbNoCacheInsert(t *testing.B) {
	t.StopTimer()
	engine, err := newTidbEngine()
	if err != nil {
		t.Error(err)
		return
	}
	defer engine.Close()

	tests.DoBenchInsert(engine, t)
}
Exemple #2
0
func BenchmarkTidbCacheInsert(t *testing.B) {
	t.StopTimer()
	engine, err := newTidbEngine("goleveldb")
	if err != nil {
		t.Error(err)
		return
	}
	defer engine.Close()

	engine.SetDefaultCacher(newCache())
	tests.DoBenchInsert(engine, t)
}