更新TeaGo,提升SQL解析效率、自动开启SQL查询缓存

This commit is contained in:
刘祥超
2021-08-29 10:21:42 +08:00
parent 3f5e4babc7
commit 1796bb8f96
3 changed files with 15 additions and 2 deletions

View File

@@ -144,3 +144,15 @@ func TestServerDAO_FindAllEnabledServersWithNode(t *testing.T) {
t.Log("serverId:", server.Id, "clusterId:", server.ClusterId)
}
}
func BenchmarkServerDAO_CountAllEnabledServers(b *testing.B) {
SharedServerDAO = NewServerDAO()
for i := 0; i < b.N; i++ {
result, err := SharedServerDAO.CountAllEnabledServers(nil)
if err != nil {
b.Fatal(err)
}
_ = result
}
}