Add console.time for fetching staff LDB

Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
Fred Boniface 2023-08-07 11:20:19 +01:00
parent 332aff4a17
commit 0673637fa3

View File

@ -65,9 +65,11 @@ async function arrDepBoardStaff(CRS) {
services: 'PBS' services: 'PBS'
}; };
const api = new ldb(ldbsvKey,true); const api = new ldb(ldbsvKey,true);
console.time(`Fetch Staff LDB for ${CRS.toUpperCase()}`);
const result = await api.call('GetArrivalDepartureBoardByCRS',options,false,false); const result = await api.call('GetArrivalDepartureBoardByCRS',options,false,false);
console.timeEnd(`Fetch Staff LDB for ${CRS.toUpperCase()}`)
try { try {
const transformationTest = staffStationTransform(result) const _staffLdb = staffStationTransform(result)
console.log("Transformation Test Successful") console.log("Transformation Test Successful")
} catch (err) { } catch (err) {
console.log("Transformation Test Failed: " + err) console.log("Transformation Test Failed: " + err)