Retrieve Mongoose Query Queue Time Metrics

久未见 提交于 2021-02-11 13:30:10

问题


In order to optimize the connection pool size, I thought it would make sense to graph query queue times. Is it possible to retrieve this metric from Mongoose?


回答1:


See here for node monitoring. You need cmap events that apparently aren't documented there, see Ruby docs for example but they should be published by the node driver also.

Track ConnectionCheckOutStarted and ConnectionCheckOutSucceeded and subtract the times to get the wait time.



来源:https://stackoverflow.com/questions/63652084/retrieve-mongoose-query-queue-time-metrics

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!