Repository navigation
Make interpreter cache invalidation test deterministic - #22310
Conversation
Consecutive executable writes can have the same Unix ctime. Give the existing well-formed interpreter cache entry a deliberately different timestamp, then assert that the real query path replaces its stale metadata and reuses the refreshed entry.
Merging this PR will improve performance by 6.64%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | Simulation | pip_install |
22.2 ms | 20.8 ms | +6.64% |
Tip
Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.
Comparing zb/future-20260912-interpreter-cache-ctime-test (9a13dd6) with main (1f24ecd)2
Footnotes
-
47 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
-
No successful run was found on
main(7248453) during the generation of this report, so 1f24ecd was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩
Consecutive writes to the mock Python executable can retain the same Unix
ctime, makingtest_cache_invalidationfail before exercising cache invalidation. Give the well-formed cached entry a different timestamp so the stale-cache case is independent of filesystem clock resolution.