Skip to content

Is there a way to get the request queue time or requset come time #3440

Closed
@Y-Destiny

Description

@Y-Destiny

Description:

I've created a Tornado service using HTTPServer, where each request triggers an HTTPClient call to another more time-consuming service. When running the service as a single process and making concurrent requests, later requests wait for earlier ones to complete before they are processed.

I've reviewed the RequestHandler source code and noticed that the request_time function only measures the duration from the start of processing (initialization) to the end of the request, which doesn't include time spent waiting in the queue.

I would like to obtain the actual time each request spends in the queue before it starts being processed, as well as the total time (queue time + processing time) it takes to complete each request. This information would allow for more accurate request analysis.

Is there currently a way to obtain the queue time or the time when each request first arrives at the server?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions