MCPcopy Create free account
hub / github.com/angular/angular / writeTraceFile

Function writeTraceFile

packages/compiler-cli/preprocessor/src/perf.ts:548–551  ·  view source on GitHub ↗
(filePath: string, events: TraceEvent[])

Source from the content-addressed store, hash-verified

546
547/** Writes `events` to `filePath` as a Chrome trace JSON array, overwriting it. */
548export async function writeTraceFile(filePath: string, events: TraceEvent[]): Promise<void> {
549 await fs.mkdir(path.dirname(filePath), {recursive: true});
550 await fs.writeFile(filePath, JSON.stringify(events), 'utf8');
551}
552
553/** Writes `summary` to `filePath` as JSON, overwriting it. */
554export async function writeSummaryFile(filePath: string, summary: PerfSummary): Promise<void> {

Callers 1

main.tsFile · 0.85

Calls 3

mkdirMethod · 0.80
dirnameMethod · 0.65
writeFileMethod · 0.65

Tested by

no test coverage detected