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

Function BenchmarkAlterTableStatementPool

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

Source from the content-addressed store, hash-verified

980}
981
982func BenchmarkAlterTableStatementPool(b *testing.B) {
983 b.Run("GetPutAlterTableStatement", func(b *testing.B) {
984 b.ReportAllocs()
985 for i := 0; i < b.N; i++ {
986 stmt := GetAlterTableStatement()
987 stmt.Table = "users"
988 stmt.Actions = append(stmt.Actions, AlterTableAction{
989 Type: "ADD COLUMN",
990 ColumnName: "email",
991 })
992 PutAlterTableStatement(stmt)
993 }
994 })
995}
996
997func BenchmarkCreateIndexStatementPool(b *testing.B) {
998 b.Run("GetPutCreateIndexStatement", func(b *testing.B) {

Callers

nothing calls this directly

Calls 3

GetAlterTableStatementFunction · 0.85
PutAlterTableStatementFunction · 0.85
RunMethod · 0.80

Tested by

no test coverage detected