Getting breakdown of responseTime timing

I see that I can view the total response time using the variable pm.response.responeTime.
When I hover over the “Time” in the request window, I see the response time broken down by into Socket Initialization, DNS Lookup, TCP Handshake, SSL Handshake, Transfer Start, and Download.

How can I get to the variable that hold these components of the total response time?
E.g. I want to check TCP Handshake and SSL Handshake timings in code.
Thank you!
Sam

1 Like

Hi @sambonator!

Welcome to the community! :clap:

This is a great question! I found this post of yours because I was looking for the same! I do like the breakdown the UI provides and wanted to get the variables as well.

Doing a look in the Postman SDK Docs, I do see where in their code that the times are available, its under and objects called timings. However, the pm API doesn’t seem to publicly expose the timings variable.

https://www.postmanlabs.com/postman-collection/Response.html#.timings

You’ll see timings available at the bottom, but no variable, or method for an object of Response type contains these values. I searched within the Request code as well, and it’s the same thing.

Additionally, looks like the code for these public types seems to comment out the timings, so not sure if thats intentional for a future release or not.

I’m not sure whom is best to reach out, but I will tag a developer advocate I’ve spoken to many times. @arlem, would you be able to reach out to a developer to provide more clarity here? Thanks in advance :slight_smile:

2 Likes

Any updates? I can find this variable as timingPhases in response codes. Don’t know why I can’t use it.

https://www.postmanlabs.com/postman-collection/collection_response.js.html

1 Like

I too can’t use timing values. Is there an update on this or snipped code we can use ? Thank you.