MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / BenchmarkDropStatementPool

Function BenchmarkDropStatementPool

pkg/sql/ast/pool_ddl_test.go:1016–1027  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

1014}
1015
1016func BenchmarkDropStatementPool(b *testing.B) {
1017 b.Run("GetPutDropStatement", func(b *testing.B) {
1018 b.ReportAllocs()
1019 for i := 0; i < b.N; i++ {
1020 stmt := GetDropStatement()
1021 stmt.ObjectType = "TABLE"
1022 stmt.IfExists = true
1023 stmt.Names = append(stmt.Names, "users")
1024 PutDropStatement(stmt)
1025 }
1026 })
1027}
1028
1029func BenchmarkTruncateStatementPool(b *testing.B) {
1030 b.Run("GetPutTruncateStatement", func(b *testing.B) {

Callers

nothing calls this directly

Calls 3

GetDropStatementFunction · 0.85
PutDropStatementFunction · 0.85
RunMethod · 0.80

Tested by

no test coverage detected