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

Function BenchmarkGoSimpleJsonMedium

benchmark/benchmark_medium_payload_test.go:314–327  ·  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

(b *testing.B)

Source from the content-addressed store, hash-verified

312// Verifies: STK-REQ-007
313// MCDC STK-REQ-007: N/A
314func BenchmarkGoSimpleJsonMedium(b *testing.B) {
315 for i := 0; i < b.N; i++ {
316 json, _ := simplejson.NewJson(mediumFixture)
317 person := json.Get("person")
318 person.Get("name").Get("fullName").String()
319 person.Get("github").Get("followers").Float64()
320 json.Get("company")
321 arr, _ := person.Get("gravatar").Get("avatars").Array()
322
323 for _, el := range arr {
324 nothing(el.(map[string]interface{})["url"])
325 }
326 }
327}
328
329/*
330 github.com/pquerna/ffjson

Callers

nothing calls this directly

Calls 2

nothingFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…