()
| 304 | samples = JSON_SAMPLES |
| 305 | |
| 306 | def worker(): |
| 307 | deadline = time.monotonic() + DURATION |
| 308 | i = 0 |
| 309 | for _ in range(ITERATIONS): |
| 310 | doc = samples[i % len(samples)] |
| 311 | try: |
| 312 | scanner(doc, 0) |
| 313 | except Exception: |
| 314 | pass |
| 315 | i += 1 |
| 316 | if time.monotonic() > deadline: |
| 317 | break |
| 318 | |
| 319 | run_scenario("shared scanner (scanner s->memo races)", [worker]) |
| 320 |
searching dependent graphs…