()
| 207 | // every complete stringify of the value visits the probe exactly once. |
| 208 | describe("execute outcome measurement cost", () => { |
| 209 | const instrumented = () => { |
| 210 | let walks = 0; |
| 211 | const probe = { |
| 212 | toJSON: () => { |
| 213 | walks += 1; |
| 214 | return "probe"; |
| 215 | }, |
| 216 | }; |
| 217 | return { value: { data: [1, 2, 3], probe }, walks: () => walks }; |
| 218 | }; |
| 219 | |
| 220 | const executorFor = (result: ExecuteResult): CodeExecutor<FakeRuntimeError> => ({ |
| 221 | execute: () => Effect.succeed(result), |