Add time logs to StaffLdb Transformation
Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
parent
5e31361880
commit
a2777f1f37
@ -6,6 +6,7 @@ import { removeNewlineAndPTag } from '../../newSanitizer';
|
||||
|
||||
/// I do not yet have a type defined for any of the input object
|
||||
export function transform(input: any): StaffLdb | null {
|
||||
console.time("StaffLdb Transformation")
|
||||
const data = input.GetBoardResult
|
||||
let output: StaffLdb
|
||||
try {
|
||||
@ -18,10 +19,12 @@ export function transform(input: any): StaffLdb | null {
|
||||
busServices: transformTrainServices(data?.busServices) || undefined,
|
||||
ferryServices: transformTrainServices(data?.ferryServices) || undefined
|
||||
}
|
||||
console.timeEnd("StaffLdb Transformation")
|
||||
return output
|
||||
} catch (err) {
|
||||
console.log('Unable to parse data, assuming no data: ' + err)
|
||||
}
|
||||
console.timeEnd("StaffLdb Transformation")
|
||||
return null
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user