* 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
(b *testing.B)
| 28 | // Verifies: STK-REQ-004 |
| 29 | // MCDC STK-REQ-004: N/A |
| 30 | func BenchmarkJsonParserLarge(b *testing.B) { |
| 31 | for i := 0; i < b.N; i++ { |
| 32 | jsonparser.ArrayEach(largeFixture, func(value []byte, dataType jsonparser.ValueType, offset int, err error) { |
| 33 | jsonparser.Get(value, "username") |
| 34 | nothing() |
| 35 | }, "users") |
| 36 | |
| 37 | jsonparser.ArrayEach(largeFixture, func(value []byte, dataType jsonparser.ValueType, offset int, err error) { |
| 38 | jsonparser.GetInt(value, "id") |
| 39 | jsonparser.Get(value, "slug") |
| 40 | nothing() |
| 41 | }, "topics", "topics") |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | /* |
| 46 | encoding/json |