(b *testing.B)
| 995 | } |
| 996 | |
| 997 | func BenchmarkCreateIndexStatementPool(b *testing.B) { |
| 998 | b.Run("GetPutCreateIndexStatement", func(b *testing.B) { |
| 999 | b.ReportAllocs() |
| 1000 | for i := 0; i < b.N; i++ { |
| 1001 | stmt := GetCreateIndexStatement() |
| 1002 | stmt.Name = "idx_email" |
| 1003 | stmt.Table = "users" |
| 1004 | stmt.Unique = true |
| 1005 | stmt.Columns = append(stmt.Columns, IndexColumn{Column: "email", Direction: "ASC"}) |
| 1006 | stmt.Where = &BinaryExpression{ |
| 1007 | Left: &Identifier{Name: "active"}, |
| 1008 | Operator: "=", |
| 1009 | Right: &LiteralValue{Value: "true"}, |
| 1010 | } |
| 1011 | PutCreateIndexStatement(stmt) |
| 1012 | } |
| 1013 | }) |
| 1014 | } |
| 1015 | |
| 1016 | func BenchmarkDropStatementPool(b *testing.B) { |
| 1017 | b.Run("GetPutDropStatement", func(b *testing.B) { |
nothing calls this directly
no test coverage detected