MCPcopy Create free account
hub / github.com/cogentcore/core / BenchmarkNodeUnmarshalJSON

Function BenchmarkNodeUnmarshalJSON

tree/io_test.go:80–89  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

78}
79
80func BenchmarkNodeUnmarshalJSON(b *testing.B) {
81 parent := testNodeTree()
82 var buf bytes.Buffer
83 assert.NoError(b, jsonx.Write(&parent, &buf))
84 bs := buf.Bytes()
85 for range b.N {
86 testload := testdata.NewNodeEmbed()
87 assert.NoError(b, jsonx.Read(&testload, bytes.NewReader(bs)))
88 }
89}
90
91/* TODO: add back tree xml support
92func TestNodeXML(t *testing.T) {

Callers

nothing calls this directly

Calls 5

WriteFunction · 0.92
NewNodeEmbedFunction · 0.92
ReadFunction · 0.92
testNodeTreeFunction · 0.85
BytesMethod · 0.45

Tested by

no test coverage detected