mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-23 15:00:25 +08:00
更新TeaGo,提升SQL解析效率、自动开启SQL查询缓存
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user