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

Function BenchmarkPutExpression

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

Source from the content-addressed store, hash-verified

80}
81
82func BenchmarkPutExpression(b *testing.B) {
83 b.Run("PutIdentifier", func(b *testing.B) {
84 b.ReportAllocs()
85 ident := &Identifier{Name: "test"}
86 for i := 0; i < b.N; i++ {
87 PutExpression(ident)
88 }
89 })
90
91 b.Run("PutBinaryExpression", func(b *testing.B) {
92 b.ReportAllocs()
93 binExpr := &BinaryExpression{
94 Left: &Identifier{Name: "id"},
95 Operator: "=",
96 Right: &Identifier{Name: "1"},
97 }
98 for i := 0; i < b.N; i++ {
99 PutExpression(binExpr)
100 }
101 })
102}
103
104func BenchmarkParallel(b *testing.B) {
105 b.Run("ParallelSelectStatement", func(b *testing.B) {

Callers

nothing calls this directly

Calls 2

PutExpressionFunction · 0.85
RunMethod · 0.80

Tested by

no test coverage detected