in web/src/js/gcping.js [128:149]
function pingSingleRegion(regionKey) {
return new Promise((resolve) => {
const gcpZone = regions[regionKey];
const start = new Date().getTime();
fetch(gcpZone.pingUrl, {
cache: "no-cache",
}).then(async (resp) => {
const latency = new Date().getTime() - start;
// if we just pinged the global region, the response should contain
// the region that the Global Load Balancer uses to route the traffic.
if (regionKey === GLOBAL_REGION_KEY) {
resp.text().then((val) => {
globalRegionProxy = val.trim();
});
}
resolve(latency);
});
});
}