From ae664da0e4073c1b477552d37b29875b5e9ef69a Mon Sep 17 00:00:00 2001 From: Elijah Duffy Date: Wed, 24 Dec 2025 18:29:19 -0800 Subject: [PATCH] node: use performance.now for readiness duration --- node-health/src/readiness.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/node-health/src/readiness.ts b/node-health/src/readiness.ts index ed3d357..9f55399 100644 --- a/node-health/src/readiness.ts +++ b/node-health/src/readiness.ts @@ -28,8 +28,11 @@ export type ReadinessResult = { /** Detail of an individual readiness check */ export type ReadinessDetail = { + /** Name of the readiness check */ name: string; + /** Status of the readiness check */ status: ReadinessStatus; + /** Optional message providing additional information about the readiness check */ message?: string; }; @@ -40,6 +43,7 @@ export type ReadinessDetail = { */ export const readiness = async (checks: ReadinessFunction[]): Promise => { const start = Date.now(); + const t0 = performance.now(); const details: ReadinessDetail[] = []; for (const check of checks) { @@ -55,7 +59,7 @@ export const readiness = async (checks: ReadinessFunction[]): Promise d.status)),