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

Function BenchmarkBinaryExpressionPool

pkg/sql/ast/ast_bench_test.go:58–69  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

56}
57
58func 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
71func BenchmarkExpressionSlicePool(b *testing.B) {
72 b.Run("GetPutExpressionSlice", func(b *testing.B) {

Callers

nothing calls this directly

Calls 3

GetBinaryExpressionFunction · 0.85
PutBinaryExpressionFunction · 0.85
RunMethod · 0.80

Tested by

no test coverage detected