In src/registry/middleware/request-handler.ts, we are currently multiplying the response time by 1000:
duration: Number.parseInt(String(time * 1000), 10),
This incorrectly converts milliseconds to microseconds, resulting in inflated response time values.
The response-time library already provides time in milliseconds (e.g., 0.9457 or 20.5857), as documented. Multiplying by 1000 and parsing as an integer is unnecessary and may reduce precision for fast requests.
Suggested solution:
Keep the time value as-is in milliseconds:
This will ensure accurate reporting of response times, including fractional milliseconds, and align with standard web performance monitoring practices.
Additional context:
- Using parseInt would truncate sub-millisecond precision.
- Standard monitoring tools typically expect milliseconds, so no conversion is needed.
Screenshots
