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

Function BenchmarkJsonParserLarge

benchmark/benchmark_large_payload_test.go:30–43  ·  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

(b *testing.B)

Source from the content-addressed store, hash-verified

28// Verifies: STK-REQ-004
29// MCDC STK-REQ-004: N/A
30func BenchmarkJsonParserLarge(b *testing.B) {
31 for i := 0; i < b.N; i++ {
32 jsonparser.ArrayEach(largeFixture, func(value []byte, dataType jsonparser.ValueType, offset int, err error) {
33 jsonparser.Get(value, "username")
34 nothing()
35 }, "users")
36
37 jsonparser.ArrayEach(largeFixture, func(value []byte, dataType jsonparser.ValueType, offset int, err error) {
38 jsonparser.GetInt(value, "id")
39 jsonparser.Get(value, "slug")
40 nothing()
41 }, "topics", "topics")
42 }
43}
44
45/*
46 encoding/json

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…