示例#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)
}