Example #1
0
 /// <summary>
 /// Access the runtime data. This indexer tracks the access to the table.
 /// </summary>
 /// <remarks>
 /// We use a different indexer for process pips for more accurate statistics
 /// </remarks>
 public ProcessPipHistoricPerfData this[ProcessRunnablePip runnablePip]
 {
     get
     {
         Contract.Assert(runnablePip.HistoricPerfData == null, "Historic perf data shouldn't be queried multiple times for the same pip");
         return(Get(runnablePip.Process.SemiStableHash, trackAccess: true));
     }
     set => Set(runnablePip.Process.SemiStableHash, value, trackAccess: true);
Example #2
0
 /// <nodoc/>
 public PerProcessPipPerformanceInformation(
     ref ProcessRunnablePip runnablePip,
     int pipExecutionMs,
     int peakWorkingMemoryMb,
     int ioReadMb,
     int ioWriteMb)
 {
     RunnablePip         = runnablePip;
     PipExecutionMs      = pipExecutionMs;
     PeakWorkingMemoryMb = peakWorkingMemoryMb;
     IOReadMb            = ioReadMb;
     IOWriteMb           = ioWriteMb;
 }
Example #3
0
        internal void UpdatePipPropertyInfo(ProcessRunnablePip processRunnable, ExecutionResult executionResult)
        {
            if (executionResult.PipProperties != null && executionResult.PipProperties.Count > 0)
            {
                foreach (var kvp in executionResult.PipProperties)
                {
                    m_aggregatedPipPropertiesCount.AddOrUpdate(kvp.Key, kvp.Value, (key, oldValue) => oldValue + kvp.Value);

                    var impactedPips = m_addgregatepipsPerPipProperty.GetOrAdd(kvp.Key, new HashSet <string>());
                    lock (m_addgregatepipsPerPipProperty)
                    {
                        if (impactedPips.Count < MaxListOfPipIdsForTelemetry)
                        {
                            impactedPips.Add(processRunnable.Process.FormattedSemiStableHash);
                        }
                    }
                }
            }
        }
Example #4
0
 internal void UpdatePipRetryInfo(ProcessRunnablePip processRunnable, ExecutionResult executionResult, CounterCollection <PipExecutorCounter> pipExecutionCounters)
 {
     if (executionResult.HasUserRetries)
     {
         if (executionResult.Result == PipResultStatus.Succeeded)
         {
             pipExecutionCounters.IncrementCounter(PipExecutorCounter.ProcessUserRetriesSucceededPipsCount);
             if (m_pipsSucceedingAfterUserRetry.Count < MaxListOfPipIdsForTelemetry)
             {
                 m_pipsSucceedingAfterUserRetry.Add(processRunnable.Process.FormattedSemiStableHash);
             }
         }
         else if (executionResult.Result == PipResultStatus.Failed)
         {
             pipExecutionCounters.IncrementCounter(PipExecutorCounter.ProcessUserRetriesFailedPipsCount);
             if (m_pipsFailingAfterLastUserRetry.Count < MaxListOfPipIdsForTelemetry)
             {
                 m_pipsFailingAfterLastUserRetry.Add(processRunnable.Process.FormattedSemiStableHash);
             }
         }
     }
 }