Пример #1
0
 /// <nodoc />
 internal DebugLogsAnalyzer(AnalysisInput input, int port)
     : base(input)
 {
     XlgState = new XlgDebuggerState(this);
     m_criticalPathAnalyzer = new CriticalPathAnalyzer(input, outputFilePath: null);
     m_lazyCriticalPath     = Lazy.Create(() =>
     {
         m_criticalPathAnalyzer.Analyze();
         return(m_criticalPathAnalyzer.criticalPathData);
     });
     m_port            = port;
     m_state           = new DebuggerState(PathTable, LoggingContext, XlgState.Render, XlgState);
     m_lazyPipPerfDict = new Lazy <Dictionary <PipId, PipExecutionPerformance> >(() =>
     {
         return(m_writeExecutionEntries.ToDictionary(e => e.PipId, e => e.ExecutionPerformance));
     });
     m_lazyPipsBySemiStableHash = new Lazy <Dictionary <long, PipId> >(() =>
     {
         var result = new Dictionary <long, PipId>();
         foreach (var pipId in PipTable.Keys)
         {
             result[PipTable.GetPipSemiStableHash(pipId)] = pipId;
         }
         return(result);
     });
 }
Пример #2
0
 /// <nodoc />
 internal DebugLogsAnalyzer(AnalysisInput input, int port, bool enableCaching, bool ensureOrdering)
     : base(input)
 {
     m_port                 = port;
     EnableEvalCaching      = enableCaching;
     EnsureOrdering         = ensureOrdering;
     XlgState               = new XlgDebuggerState(this);
     m_dirData              = new MultiValueDictionary <AbsolutePath, DirectoryMembershipHashedEventData>();
     m_criticalPathAnalyzer = new CriticalPathAnalyzer(input, outputFilePath: null);
     m_lazyCriticalPath     = Lazy.Create(() =>
     {
         m_criticalPathAnalyzer.Analyze();
         return(m_criticalPathAnalyzer.criticalPathData);
     });
     m_state           = new DebuggerState(PathTable, LoggingContext, XlgState.Render, XlgState);
     m_lazyPipPerfDict = new Lazy <Dictionary <PipId, PipExecutionPerformance> >(() =>
     {
         return(m_writeExecutionEntries.ToDictionary(e => e.PipId, e => e.ExecutionPerformance));
     });
     m_lazyPipsBySemiStableHash = new Lazy <Dictionary <long, PipId> >(() =>
     {
         var result = new Dictionary <long, PipId>();
         foreach (var pipId in PipTable.Keys)
         {
             result[PipTable.GetPipSemiStableHash(pipId)] = pipId;
         }
         return(result);
     });
 }
Пример #3
0
        /// <nodoc />
        internal DebugLogsAnalyzer(AnalysisInput input, int port, bool enableCaching, bool ensureOrdering, bool preHydrateProcessPips = true)
            : base(input)
        {
            m_port                 = port;
            EnableEvalCaching      = enableCaching;
            EnsureOrdering         = ensureOrdering;
            XlgState               = new XlgDebuggerState(this);
            m_dirData              = new MultiValueDictionary <AbsolutePath, DirectoryMembershipHashedEventData>();
            m_criticalPathAnalyzer = new CriticalPathAnalyzer(input, outputFilePath: null);
            m_lazyCriticalPath     = Lazy.Create(() =>
            {
                m_criticalPathAnalyzer.Analyze();
                return(m_criticalPathAnalyzer.criticalPathData);
            });
            m_state           = new DebuggerState(PathTable, LoggingContext, XlgState.Render, XlgState);
            m_lazyPipPerfDict = new Lazy <Dictionary <PipId, PipExecutionPerformance> >(() =>
            {
                return(m_writeExecutionEntries.ToDictionary(e => e.PipId, e => e.ExecutionPerformance));
            });
            m_lazyPipsBySemiStableHash = new Lazy <Dictionary <long, PipId> >(() =>
            {
                var result = new Dictionary <long, PipId>();
                foreach (var pipId in PipTable.Keys)
                {
                    result[PipTable.GetPipSemiStableHash(pipId)] = pipId;
                }
                return(result);
            });

            if (preHydrateProcessPips)
            {
                Task
                .Run(() =>
                {
                    var start = DateTime.UtcNow;
                    Console.WriteLine("=== Started hydrating process pips");
                    Analysis.IgnoreResult(PipGraph.RetrievePipsOfType(Pips.Operations.PipType.Process).ToArray());
                    Console.WriteLine("=== Done hydrating process pips in " + DateTime.UtcNow.Subtract(start));
                })
                .Forget(ex =>
                {
                    Console.WriteLine("=== Prehydrating pips failed: " + ex);
                });
            }
        }