(b *testing.B)
| 29 | } |
| 30 | |
| 31 | func BenchmarkSelectStatementPool(b *testing.B) { |
| 32 | b.Run("GetPutSelectStatement", func(b *testing.B) { |
| 33 | b.ReportAllocs() |
| 34 | for i := 0; i < b.N; i++ { |
| 35 | stmt := GetSelectStatement() |
| 36 | stmt.Columns = append(stmt.Columns, &Identifier{Name: "id"}) |
| 37 | stmt.Where = &BinaryExpression{ |
| 38 | Left: &Identifier{Name: "id"}, |
| 39 | Operator: "=", |
| 40 | Right: &Identifier{Name: "1"}, |
| 41 | } |
| 42 | PutSelectStatement(stmt) |
| 43 | } |
| 44 | }) |
| 45 | } |
| 46 | |
| 47 | func BenchmarkIdentifierPool(b *testing.B) { |
| 48 | b.Run("GetPutIdentifier", func(b *testing.B) { |
nothing calls this directly
no test coverage detected