コード例 #1
0
 /// <inheritdoc />
 public override void PipExecutionStepPerformanceReported(PipExecutionStepPerformanceEventData data)
 {
     // Remove the counts after the pip completes
     if (data.Step == PipExecutionStep.HandleResult && PipGraph.PipTable.GetPipType(data.PipId) == PipType.Process)
     {
         m_observedInputCounts.RemoveKey(data.PipId);
     }
 }
コード例 #2
0
 /// <inheritdoc />
 public override void PipExecutionStepPerformanceReported(PipExecutionStepPerformanceEventData data)
 {
     if (data.IncludeInRunningTime)
     {
         var times = m_elapsedTimes[data.PipId.Value];
         times.WallClockTime += data.Duration;
         m_elapsedTimes[data.PipId.Value] = times;
     }
 }
コード例 #3
0
 public override void PipExecutionStepPerformanceReported(PipExecutionStepPerformanceEventData data)
 {
     if (data.Step == Scheduler.PipExecutionStep.ExecuteProcess)
     {
         if (data.Dispatcher == Scheduler.WorkDispatcher.DispatcherKind.CPU)
         {
             m_cpuStepDurations[data.PipId] = data.Duration;
         }
     }
 }
コード例 #4
0
        public override void PipExecutionStepPerformanceReported(PipExecutionStepPerformanceEventData data)
        {
            if (data.Step == PipExecutionStep.ExecuteProcess || data.Step == PipExecutionStep.ExecuteNonProcessPip)
            {
                var times = m_elapsedTimes[data.PipId.Value];

                times.ExecuteDuration            = data.Duration > times.ExecuteDuration ? data.Duration : times.ExecuteDuration;
                m_elapsedTimes[data.PipId.Value] = times;
            }
        }
コード例 #5
0
        public override void PipExecutionStepPerformanceReported(PipExecutionStepPerformanceEventData data)
        {
            if (m_producers.Contains(data.PipId))
            {
                m_writer.WriteLine("Step: " + data.Step);
                m_writer.WriteLine("Start: " + data.StartTime);
                m_writer.WriteLine("Duration: " + data.Duration);
                m_writer.WriteLine();
            }

            base.PipExecutionStepPerformanceReported(data);
        }
コード例 #6
0
ファイル: DumpPipAnalyzer.cs プロジェクト: jmarolf/BuildXL
 public override void PipExecutionStepPerformanceReported(PipExecutionStepPerformanceEventData data)
 {
     if (data.PipId == m_pip.PipId)
     {
         m_sections.Add(
             m_html.CreateBlock(
                 "Pip Execution Step Performance Event Data",
                 m_html.CreateRow("StartTime", data.StartTime),
                 m_html.CreateRow("Duration", data.Duration),
                 m_html.CreateEnumRow("Step", data.Step),
                 m_html.CreateEnumRow("Dispatcher", data.Dispatcher)));
     }
 }
コード例 #7
0
        /// <summary>
        /// Override event to capture its data and store it in the protobuf
        /// </summary>
        public override void PipExecutionStepPerformanceReported(PipExecutionStepPerformanceEventData data)
        {
            var value = data.ToPipExecutionStepPerformanceReportedEvent(WorkerID.Value);
            var key   = new EventKey
            {
                EventTypeID = Xldb.Proto.ExecutionEventId.PipExecutionStepPerformanceReported,
                PipId       = data.PipId.Value,
                PipExecutionStepPerformanceKey = value.Step,
                EventSequenceNumber            = Interlocked.Increment(ref m_eventSequenceNumber)
            };

            var keyArr   = key.ToByteArray();
            var valueArr = value.ToByteArray();

            WriteToDb(keyArr, valueArr, XldbDataStore.EventColumnFamilyName);
            AddToDbStorageDictionary(DBStoredTypes.PipExecutionStepPerformanceReported, keyArr.Length + valueArr.Length);
        }
コード例 #8
0
ファイル: BuildSimulator.cs プロジェクト: socat/BuildXL
        public override void PipExecutionStepPerformanceReported(PipExecutionStepPerformanceEventData data)
        {
            var startTime = (ulong)data.StartTime.Ticks;
            var endTime   = (ulong)(data.StartTime + data.Duration).Ticks;

            startTime.Min(ref m_executionData.MinStartTime);
            endTime.Max(ref m_executionData.MaxEndTime);

            if (!IncludedExecutionSteps[(int)data.Step])
            {
                return;
            }

            var currentStartTime = m_executionData.StartTimes[data.PipId.ToNodeId()];

            if (currentStartTime == 0 || currentStartTime > startTime)
            {
                m_executionData.StartTimes[data.PipId.ToNodeId()] = startTime;
            }

            m_executionData.Durations[data.PipId.ToNodeId()] += endTime - startTime;
        }
コード例 #9
0
 public override void PipExecutionStepPerformanceReported(PipExecutionStepPerformanceEventData data)
 {
     m_executedPips.Add(data.PipId);
 }
コード例 #10
0
        /// <nodoc />
        public static PipExecutionStepPerformanceReportedEvent ToPipExecutionStepPerformanceReportedEvent(this PipExecutionStepPerformanceEventData data, uint workerID)
        {
            var pipExecStepPerformanceEvent = new PipExecutionStepPerformanceReportedEvent
            {
                WorkerID   = workerID,
                PipID      = data.PipId.Value,
                StartTime  = Google.Protobuf.WellKnownTypes.Timestamp.FromDateTime(data.StartTime),
                Duration   = Google.Protobuf.WellKnownTypes.Duration.FromTimeSpan(data.Duration),
                Step       = (PipExecutionStep)(data.Step + 1),
                Dispatcher = (WorkDispatcher_DispatcherKind)(data.Dispatcher + 1)
            };

            return(pipExecStepPerformanceEvent);
        }
コード例 #11
0
 /// <summary>
 /// PipExecutionStep performance is reported.
 /// </summary>
 public virtual void PipExecutionStepPerformanceReported(PipExecutionStepPerformanceEventData data)
 {
     ReportUnhandledEvent(data);
 }
コード例 #12
0
 /// <inheritdoc />
 public override void PipExecutionStepPerformanceReported(PipExecutionStepPerformanceEventData data)
 {
     m_criticalPathAnalyzer.PipExecutionStepPerformanceReported(data);
 }
コード例 #13
0
        /// <nodoc />
        public static Xldb.PipExecutionStepPerformanceReportedEvent ToPipExecutionStepPerformanceReportedEvent(this PipExecutionStepPerformanceEventData data, uint workerID)
        {
            var Uuid = Guid.NewGuid().ToString();

            var pipExecStepPerformanceEvent = new Xldb.PipExecutionStepPerformanceReportedEvent
            {
                UUID       = Uuid,
                WorkerID   = workerID,
                PipID      = data.PipId.Value,
                StartTime  = Google.Protobuf.WellKnownTypes.Timestamp.FromDateTime(data.StartTime),
                Duration   = Google.Protobuf.WellKnownTypes.Duration.FromTimeSpan(data.Duration),
                Step       = (Xldb.PipExecutionStep)data.Step,
                Dispatcher = (Xldb.WorkDispatcher_DispatcherKind)data.Dispatcher
            };

            return(pipExecStepPerformanceEvent);
        }