()
| 419 | // every complete stringify of the value visits the probe exactly once. |
| 420 | describe("execute outcome measurement cost", () => { |
| 421 | const instrumented = () => { |
| 422 | let walks = 0; |
| 423 | const probe = { |
| 424 | toJSON: () => { |
| 425 | walks += 1; |
| 426 | return "probe"; |
| 427 | }, |
| 428 | }; |
| 429 | return { value: { data: [1, 2, 3], probe }, walks: () => walks }; |
| 430 | }; |
| 431 | |
| 432 | const executorFor = (result: ExecuteResult): CodeExecutor<FakeRuntimeError> => ({ |
| 433 | execute: () => Effect.succeed(result), |