'WMS request (GetMap) - time response

I am writing a python script to automate the process due to the large amount of layers I have.

I want to get the time that passes between sending the WMS request(GetMap) and loading the full data (map) in the browser

This is what I tried:

url_full_extent = '.../geocluster/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng8&TRANSPARENT=true&LAYERS=my_layer&SRS=EPSG%3A3765&CRS=EPSG%3A3765&STYLES=&WIDTH=1921&HEIGHT=522&BBOX=-173599.99999999988%2C4725700%2C1170400%2C5090400'
response = requests.get(url)
wms_time_response = response.elapsed.total_seconds()

This works but i don't get the expected response time, which I get in the browser

enter image description here

Is it possible to get this corresponding time?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source