private IFrontEndController CreateControllerWithProfiler(PathTable pathTable, SymbolTable symbolTable) { var frontEndFactory = new FrontEndFactory(); var profilerDecorator = new ProfilerDecorator(); // When evaluation is done we materialize the result of the profiler frontEndFactory.AddPhaseEndHook(EnginePhases.Evaluate, () => { var entries = profilerDecorator.GetProfiledEntries(); var materializer = new ProfilerMaterializer(pathTable); var reportDestination = Configuration.FrontEnd.ProfileReportDestination(pathTable); Logger.Log.MaterializingProfilerReport(LoggingContext, reportDestination.ToString(pathTable)); try { materializer.Materialize(entries, reportDestination); } catch (BuildXLException ex) { Logger.Log.ErrorMaterializingProfilerReport(LoggingContext, ex.LogEventErrorCode, ex.LogEventMessage); } }); return(TryCreateFrontEndController( frontEndFactory, profilerDecorator, Configuration, symbolTable, LoggingContext, Collector, collectMemoryAsSoonAsPossible: CollectMemoryAsSoonAsPossible, statistics: m_statistics)); }
public ProfilerTests(ITestOutputHelper output) : base(output) { m_profilerDecorator = new ProfilerDecorator(); }