检索 Mongoose 查询队列时间指标

Retrieve Mongoose Query Queue Time Metrics

为了优化连接池大小,我认为将查询队列时间绘制成图形是有意义的。是否可以从 Mongoose 检索此指标?

参见 here for node monitoring. You need cmap events that apparently aren't documented there, see Ruby docs 示例,但它们也应由节点驱动程序发布。

跟踪 ConnectionCheckOutStarted 和 ConnectionCheckOutSucceeded 并减去时间以获得等待时间。