示例#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)
}
示例#2
0
文件: tidb_test.go 项目: go-xorm/tidb
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)
}