Skip to content

Make elapsed time available in the response event hook #2718

@joaonc

Description

@joaonc

There are two types of elapsed time on a response:

  • The current .elapsed that accounts for total time of request, including event hooks. This is what we have now (Related to Make .elapsed reflect the entire response time. #655).
  • The elapsed time of the actual request, not taking into account the event hooks, which can take a significant amount of time, depending on what you're doing. This number is currently not available.

In many scenarios, we have request and/or response event hooks that do a time consuming process, but need the time of the actual request only, w/o event hooks. Prime example is logging the response in a response event hook and we want to include the elapsed time in the response.

Is it possible to add a mechanism in which:

  • We can access the elapsed time w/o the time to process event hooks.
  • Have that time available in the response hook.

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