* github.com/buger/jsonparser */ 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 reqproof:proptest:skip performance benchmark; measures wall-clock time and allocations, output is non-deterministic and not comparab
(b *testing.B)
| 29 | // MCDC STK-REQ-004: N/A |
| 30 | // reqproof:proptest:skip performance benchmark; measures wall-clock time and allocations, output is non-deterministic and not comparable to an independent reference |
| 31 | func BenchmarkJsonParserLarge(b *testing.B) { |
| 32 | for i := 0; i < b.N; i++ { |
| 33 | jsonparser.ArrayEach(largeFixture, func(value []byte, dataType jsonparser.ValueType, offset int, err error) { |
| 34 | jsonparser.Get(value, "username") |
| 35 | nothing() |
| 36 | }, "users") |
| 37 | |
| 38 | jsonparser.ArrayEach(largeFixture, func(value []byte, dataType jsonparser.ValueType, offset int, err error) { |
| 39 | jsonparser.GetInt(value, "id") |
| 40 | jsonparser.Get(value, "slug") |
| 41 | nothing() |
| 42 | }, "topics", "topics") |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | /* |
| 47 | encoding/json |