GenSpectrum / LAPIS

An API, a query engine, and a database schema for genomic sequences; currently with a focus on SARS-CoV-2
https://lapis-three.vercel.app
GNU Affero General Public License v3.0
21 stars 6 forks source link

Server timing API #683

Open chaoran-chen opened 7 months ago

chaoran-chen commented 7 months ago

The Chrome dev console pointed me to the Server Timing API (web.dev, MDN). It looks very useful, should we implement it?

Chrome dev console screenshot ![image](https://github.com/GenSpectrum/LAPIS/assets/18666552/b732187a-c48d-43ac-8389-1c9935191dec)
chaoran-chen commented 7 months ago

For now, I added the following line to the nginx config on the s0 server for LAPIS:

add_header Server-Timing "requestTime;desc=\"Total Request Time\";dur=$request_time, upstreamConnect;desc=\"Upstream Connect Time\";dur=$upstream_connect_time, upstreamHeader;desc=\"Upstream Header Time\";dur=$upstream_header_time, upstreamResponse;desc=\"Upstream Response Time\";dur=$upstream_response_time";

Note: the values are provided in seconds.

Information about the variables can be found in the Nginx documentation.