* github.com/a8m/djson */ 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 benchmark; measu
(b *testing.B)
| 441 | // MCDC STK-REQ-007: N/A |
| 442 | // reqproof:proptest:skip performance benchmark; measures wall-clock time and allocations, output is non-deterministic and not comparable to an independent reference |
| 443 | func BenchmarkDjsonMedium(b *testing.B) { |
| 444 | for i := 0; i < b.N; i++ { |
| 445 | m, _ := djson.DecodeObject(mediumFixture) |
| 446 | person := m["person"].(map[string]interface{}) |
| 447 | name := person["name"].(map[string]interface{}) |
| 448 | github := person["github"].(map[string]interface{}) |
| 449 | company := m["company"] |
| 450 | gravatar := person["gravatar"].(map[string]interface{}) |
| 451 | avatars := gravatar["avatars"].([]interface{}) |
| 452 | |
| 453 | nothing(name["fullName"].(string), github["followers"].(float64), company) |
| 454 | for _, a := range avatars { |
| 455 | nothing(a.(map[string]interface{})["url"]) |
| 456 | } |
| 457 | } |
| 458 | } |
| 459 | |
| 460 | /* |
| 461 | github.com/ugorji/go/codec |