(b *testing.B)
| 56 | } |
| 57 | |
| 58 | func BenchmarkBinaryExpressionPool(b *testing.B) { |
| 59 | b.Run("GetPutBinaryExpression", func(b *testing.B) { |
| 60 | b.ReportAllocs() |
| 61 | for i := 0; i < b.N; i++ { |
| 62 | expr := GetBinaryExpression() |
| 63 | expr.Left = &Identifier{Name: "id"} |
| 64 | expr.Operator = "=" |
| 65 | expr.Right = &Identifier{Name: "1"} |
| 66 | PutBinaryExpression(expr) |
| 67 | } |
| 68 | }) |
| 69 | } |
| 70 | |
| 71 | func BenchmarkExpressionSlicePool(b *testing.B) { |
| 72 | b.Run("GetPutExpressionSlice", func(b *testing.B) { |
nothing calls this directly
no test coverage detected