summaryrefslogtreecommitdiff
path: root/cli/bench/cache_api.js
diff options
context:
space:
mode:
authorsnek <snek@deno.com>2024-11-08 23:20:24 +0100
committerGitHub <noreply@github.com>2024-11-08 23:20:24 +0100
commit73fbd61bd016eebbf2776dc94c15a26bf39668d6 (patch)
treec7e5f4ee47f94f2279e745b1825959f82a66a22d /cli/bench/cache_api.js
parentd4f1bd3dacf54c4625eef7828341b39286ead8cb (diff)
fix: performance.timeOrigin (#26787)
`performance.timeOrigin` was being set from when JS started executing, but `op_now` measures from an `std::time::Instant` stored in `OpState`, which is created at a completely different time. This caused `performance.timeOrigin` to be very incorrect. This PR corrects the origin and also cleans up some of the timer code. Compared to `Date.now()`, `performance`'s time origin is now consistently within 5us (0.005ms) of system time. ![image](https://github.com/user-attachments/assets/0a7be04a-4f6d-4816-bd25-38a2e6136926)
Diffstat (limited to 'cli/bench/cache_api.js')
0 files changed, 0 insertions, 0 deletions