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

Function BenchmarkExpressionSlicePool

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

Source from the content-addressed store, hash-verified

69}
70
71func BenchmarkExpressionSlicePool(b *testing.B) {
72 b.Run("GetPutExpressionSlice", func(b *testing.B) {
73 b.ReportAllocs()
74 for i := 0; i < b.N; i++ {
75 slice := GetExpressionSlice()
76 *slice = append(*slice, &Identifier{Name: "test"})
77 PutExpressionSlice(slice)
78 }
79 })
80}
81
82func BenchmarkPutExpression(b *testing.B) {
83 b.Run("PutIdentifier", func(b *testing.B) {

Callers

nothing calls this directly

Calls 3

GetExpressionSliceFunction · 0.85
PutExpressionSliceFunction · 0.85
RunMethod · 0.80

Tested by

no test coverage detected