* github.com/mreiferson/go-ujson */ 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)
| 408 | // MCDC STK-REQ-007: N/A |
| 409 | // reqproof:proptest:skip performance benchmark; measures wall-clock time and allocations, output is non-deterministic and not comparable to an independent reference |
| 410 | func BenchmarkUjsonMedium(b *testing.B) { |
| 411 | for i := 0; i < b.N; i++ { |
| 412 | json, _ := ujson.NewFromBytes(mediumFixture) |
| 413 | |
| 414 | person := json.Get("person") |
| 415 | |
| 416 | person.Get("name").Get("fullName").String() |
| 417 | person.Get("github").Get("followers").Float64() |
| 418 | json.Get("company").String() |
| 419 | |
| 420 | arr := person.Get("gravatar").Get("avatars").Array() |
| 421 | for _, el := range arr { |
| 422 | el.Get("url").String() |
| 423 | } |
| 424 | |
| 425 | nothing() |
| 426 | } |
| 427 | } |
| 428 | |
| 429 | /* |
| 430 | github.com/a8m/djson |