Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.filter((event: any) => event.args.data.styleSheetUrl)
.forEach((event: any) => {
const url = event.args.data.styleSheetUrl;
const durationInMs = event.dur / 1000;
totalCSSDuration += durationInMs;
this.log(`CSS: ${url}: ${durationInMs.toFixed(2)}`);
});
// log css-parse-time
this.log(
`CSS: Evaluation Total Duration: ${totalCSSDuration.toFixed(2)}ms \n\n`
);
// list-functions
try {
const profile = loadTrace(trace).cpuProfile(-1, -1);
if (locations) {
profile.nodeMap.forEach((node: any) => {
const {
functionName,
url,
lineNumber,
columnNumber,
} = node.callFrame;
methods.add(
`${url}:${lineNumber}:${columnNumber}.${normalizeFnName(
functionName
)}`
);
});
} else {