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

	//engine.ShowSQL = true
	tests.DoBenchFind(engine, t)
}
예제 #2
0
func BenchmarkTidbCacheFind(t *testing.B) {
	t.StopTimer()
	engine, err := newTidbEngine()
	if err != nil {
		t.Error(err)
		return
	}
	defer engine.Close()

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