MCPcopy Create free account
hub / github.com/brimdata/super / BenchmarkValueUnder

Function BenchmarkValueUnder

value_test.go:11–27  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

9)
10
11func BenchmarkValueUnder(b *testing.B) {
12 b.Run("primitive", func(b *testing.B) {
13 val := super.Null
14 b.ResetTimer()
15 for b.Loop() {
16 val.Under()
17 }
18 })
19 b.Run("named", func(b *testing.B) {
20 typ, _ := super.NewContext().LookupTypeNamed("name", super.TypeNull)
21 val := super.NewValue(typ, nil)
22 b.ResetTimer()
23 for b.Loop() {
24 val.Under()
25 }
26 })
27}
28
29func TestValueValidate(t *testing.T) {
30 recType := super.NewTypeRecord(0, []super.Field{

Callers

nothing calls this directly

Calls 5

UnderMethod · 0.95
NewContextFunction · 0.92
NewValueFunction · 0.92
LookupTypeNamedMethod · 0.80
RunMethod · 0.65

Tested by

no test coverage detected