You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/09/28 05:53:55 UTC

[GitHub] [apisix] leslie-tsang commented on issue #5146: bug: Prometheus plugin metrics http latency sum is negative

leslie-tsang commented on issue #5146:
URL: https://github.com/apache/apisix/issues/5146#issuecomment-928873733


   @spacewander, nginx cached time to improve performance, maybe we can use func `ngx.update_time` to fix it.
   
   
   > find how `ngx.now` work
   
   https://github.com/openresty/lua-resty-core/blob/985eb5b323468effaa66deb5cbd4f800b99834cf/lib/resty/core/time.lua#L69-L71
   
   > find how `ngx_http_lua_ffi_now` work
   
   https://github.com/openresty/lua-nginx-module/blob/1c1bcfeb9276c6dfc9b038a6fa779e7e4b605bc9/src/ngx_http_lua_time.c#L17-L25
   
   > find what `ngx_timeofday` from
   
   https://github.com/nginx/nginx/blob/a64190933e06758d50eea926e6a55974645096fd/src/core/ngx_times.h#L37
   
   > `ngx_time_update` will update `ngx_timeofday`
   
   https://github.com/nginx/nginx/blob/a64190933e06758d50eea926e6a55974645096fd/src/core/ngx_times.c#L80-L192


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org