delete perfTrace.reset()
When accumulating a trace, it's important to accumulate across builds
because otherwise we can't look at how perf traces affect cross-build
performance (e.g. how building A then B affects building B vs building
B in isolation).
PiperOrigin-RevId: 188551043
diff --git a/internal/tsc_wrapped/perf_trace.ts b/internal/tsc_wrapped/perf_trace.ts
index e923ff5..6d604c0 100644
--- a/internal/tsc_wrapped/perf_trace.ts
+++ b/internal/tsc_wrapped/perf_trace.ts
@@ -67,18 +67,9 @@
events.push({name, ph: 'C', pid: 1, ts: now(), args: counts});
}
-/**
- * reset deletes all recorded entries. It should be called before a logical
- * unit of work, e.g. before compiling one target.
- */
-export function reset() {
- events = [];
-}
-
/** write writes the trace in Chrome Trace format to a given path. */
export function write(path: string) {
fs.writeFileSync(path, JSON.stringify(events), {encoding: 'utf8'});
- reset();
}
/** Record the current heap usage to the performance trace. */