问题
I am using thrift
to implement a simple application. I would like to collect the queue length at a server i.e the number of requests that are pending service at the server. It could be either the queue length per client (connection) or total queue length at a server. I am playing around with different server types and thought the ThreadManager
class would help since it collects server metrics. I created a server of type TThreadPoolServer
but the methods like ThreadManager::pendingTaskCount()
provide the number of connections that are pending service and not the number of requests that are pending service. The result was the same when I used a server of type TNonblockingServer
. Can you please point me to a way to obtain the queue length?
来源:https://stackoverflow.com/questions/62226858/obtain-the-queue-length-at-a-thrift-server