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

Function BenchmarkParallel

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

Source from the content-addressed store, hash-verified

102}
103
104func BenchmarkParallel(b *testing.B) {
105 b.Run("ParallelSelectStatement", func(b *testing.B) {
106 b.ReportAllocs()
107 b.RunParallel(func(pb *testing.PB) {
108 for pb.Next() {
109 stmt := GetSelectStatement()
110 stmt.Columns = append(stmt.Columns, &Identifier{Name: "id"})
111 stmt.Where = &BinaryExpression{
112 Left: &Identifier{Name: "id"},
113 Operator: "=",
114 Right: &Identifier{Name: "1"},
115 }
116 PutSelectStatement(stmt)
117 }
118 })
119 })
120}

Callers

nothing calls this directly

Calls 3

GetSelectStatementFunction · 0.85
PutSelectStatementFunction · 0.85
RunMethod · 0.80

Tested by

no test coverage detected