message: Added performance event that logs time taken to run GC
diff: @@ -1372,18 +1372,36 @@ export class ContainerRuntime extends TypedEventEmitter<IContainerRuntimeEvents>
  }
  if (!this.runtimeOptions.disableGC) {
  + const perfEvent = PerformanceEvent.start(summaryLogger, {
  + eventName: "GarbageCollection",
  + });
  +
  + const gcStats: { totalGCNodes?: number; deletedGCNodes?: number } = {};
  + try {
  // Get the container's GC data and run GC on the reference graph in it.
  const gcData = await this.dataStores.getGCData();
  - const { referencedNodeIds } = runGarbageCollection(gcData.gcNodes, [ "/" ], this.logger);
  + const { referencedNodeIds, deletedNodeIds } = runGarbageCollection(
  + gcData.gcNodes, [ "/" ],
  + this.logger,
  + );
  +
  + // Update stats to be reported in the peformance event.
  + gcStats.deletedGCNodes = deletedNodeIds.length;
  + gcStats.totalGCNodes = referencedNodeIds.length + gcStats.deletedGCNodes;
  - // Update our summarizer node's used routes. Updating used routes in summarizer node before summarizing
  - // is required and asserted by the the summarizer node. We are the root and are always referenced, so
  - // the used routes is only self-route (empty string).
  + // Update our summarizer node's used routes. Updating used routes in summarizer node before
  + // summarizing is required and asserted by the the summarizer node. We are the root and are
  + // always referenced, so the used routes is only self-route (empty string).
  this.summarizerNode.updateUsedRoutes([""]);
  // Remove this node's route ("/") and notify data stores of routes that are used in it.
  const usedRoutes = referencedNodeIds.filter((id: string) => { return id !== "/"; });
  this.dataStores.updateUsedRoutes(usedRoutes);
  + } catch (error) {
  + perfEvent.cancel(gcStats, error);
  + throw error;
  + }
  + perfEvent.end(gcStats);
  }
  const trace = Trace.start();
  