MCPcopy
hub / github.com/buger/jsonparser / BenchmarkJsonParserMedium

Function BenchmarkJsonParserMedium

benchmark/benchmark_medium_payload_test.go:38–49  ·  view source on GitHub ↗

* github.com/buger/jsonparser */ Verifies: STK-REQ-001 MCDC STK-REQ-001: N/A Verifies: STK-REQ-003 MCDC STK-REQ-003: N/A Verifies: STK-REQ-004 MCDC STK-REQ-004: N/A Verifies: STK-REQ-005 MCDC STK-REQ-005: N/A Verifies: STK-REQ-007 MCDC STK-REQ-007: N/A

(b *testing.B)

Source from the content-addressed store, hash-verified

36// Verifies: STK-REQ-007
37// MCDC STK-REQ-007: N/A
38func BenchmarkJsonParserMedium(b *testing.B) {
39 for i := 0; i < b.N; i++ {
40 jsonparser.Get(mediumFixture, "person", "name", "fullName")
41 jsonparser.GetInt(mediumFixture, "person", "github", "followers")
42 jsonparser.Get(mediumFixture, "company")
43
44 jsonparser.ArrayEach(mediumFixture, func(value []byte, dataType jsonparser.ValueType, offset int, err error) {
45 jsonparser.Get(value, "url")
46 nothing()
47 }, "person", "gravatar", "avatars")
48 }
49}
50
51// Verifies: STK-REQ-001
52// MCDC STK-REQ-001: N/A

Callers

nothing calls this directly

Calls 4

GetFunction · 0.92
GetIntFunction · 0.92
ArrayEachFunction · 0.92
nothingFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…