MCPcopy Create free account
hub / github.com/buger/jsonparser / BenchmarkGoSimpleJsonMedium

Function BenchmarkGoSimpleJsonMedium

benchmark/benchmark_medium_payload_test.go:323–336  ·  view source on GitHub ↗

* github.com/bitly/go-simplejson */ 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 reqproof:proptest:skip performance benchm

(b *testing.B)

Source from the content-addressed store, hash-verified

321// MCDC STK-REQ-007: N/A
322// reqproof:proptest:skip performance benchmark; measures wall-clock time and allocations, output is non-deterministic and not comparable to an independent reference
323func BenchmarkGoSimpleJsonMedium(b *testing.B) {
324 for i := 0; i < b.N; i++ {
325 json, _ := simplejson.NewJson(mediumFixture)
326 person := json.Get("person")
327 person.Get("name").Get("fullName").String()
328 person.Get("github").Get("followers").Float64()
329 json.Get("company")
330 arr, _ := person.Get("gravatar").Get("avatars").Array()
331
332 for _, el := range arr {
333 nothing(el.(map[string]interface{})["url"])
334 }
335 }
336}
337
338/*
339 github.com/pquerna/ffjson

Callers

nothing calls this directly

Calls 2

nothingFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected