Skip to content

Make .elapsed reflect the entire response time. #655

Closed

Description

@lovelydinosaur

I think we should probably switch the behavior of .elapsed so that rather than reflecting the "time for the response to start", it is instead only available once .close() has been called, and is calculated from the start of the request to the point that the response is closed.

That way it'll actually properly reflect the time taken for the entire request/response cycle.

Activity

  1. lovelydinosaur commented on Dec 20, 2019

    @lovelydinosaur
    MemberAuthor

    Two different options here during streaming responses...

    • .elapsed is not available until the response is closed.
    • .elapsed is available, but will reflect "elapsed so far", until the response is finally closed.

    I guess we probably just want to go with the former, as a more constrained option.

  2. changed the title [-]Make `.elapsed` reflect the entire request time.[/-] [+]Make `.elapsed` reflect the entire response time.[/+] on Dec 20, 2019
  3. lovelydinosaur commented on Dec 20, 2019

    @lovelydinosaur
    MemberAuthor

    We'll also want to note in the requests compat that our .elapsed property is different to requests. (Which I assume uses time-to-start-response?)

  4. added a commit that references this issue on Dec 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomersuser-experienceEnsuring that users have a good experience using the library

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions