Add time counters for total time and fetch time.
This commit is contained in:
parent
8e2185d185
commit
3a24d8ef2e
@ -1,7 +1,9 @@
|
||||
/* Fetch Functions */
|
||||
async function publicLdb(stn) {
|
||||
var url = `${window.location.origin}/api/v1/ldb/${stn}`;
|
||||
console.time("Time: Fetch LDB Data")
|
||||
var resp = await fetch(url);
|
||||
console.timeEnd("Time: Fetch LDB Data")
|
||||
return await resp.json();
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,7 @@ init()
|
||||
|
||||
/* Init function */
|
||||
async function init() {
|
||||
console.time("Loading Time")
|
||||
console.time("Time: Init to Complete")
|
||||
setLoadingDesc(`Loading\nservices`)
|
||||
var stn = await getQuery("stn");
|
||||
setLoadingDesc(`Loading\n${stn.toUpperCase()}`)
|
||||
@ -82,7 +82,7 @@ async function buildPage(data) {
|
||||
setLoadingDesc('Loading\nBusses')
|
||||
displayBus(await makeArray(data.GetStationBoardResult.busServices.service))
|
||||
}
|
||||
console.timeEnd("Loading Time")
|
||||
console.timeEnd("Time: Init to Complete")
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user