* 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 reqproof:proptest:skip performance benchmark; measures wall-clock time and allocations, output is non-deterministic and not comparable to a
(b *testing.B)
| 156 | // MCDC STK-REQ-004: N/A |
| 157 | // reqproof:proptest:skip performance benchmark; measures wall-clock time and allocations, output is non-deterministic and not comparable to an independent reference |
| 158 | func BenchmarkDjsonLarge(b *testing.B) { |
| 159 | for i := 0; i < b.N; i++ { |
| 160 | m, _ := djson.DecodeObject(largeFixture) |
| 161 | users := m["users"].([]interface{}) |
| 162 | for _, u := range users { |
| 163 | nothing(u.(map[string]interface{})["username"].(string)) |
| 164 | } |
| 165 | |
| 166 | topics := m["topics"].(map[string]interface{})["topics"].([]interface{}) |
| 167 | for _, t := range topics { |
| 168 | tI := t.(map[string]interface{}) |
| 169 | nothing(tI["id"].(float64), tI["slug"].(string)) |
| 170 | } |
| 171 | } |
| 172 | } |