* 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)
| 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 |
| 323 | func 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 |