Exemplo n.º 1
0
 /// <summary>
 /// Serialize Pip's Performance Information into Json Format
 /// </summary>
 public static string SerializePipPerfInfo(PerProcessPipPerformanceInformation perPipInfo)
 {
     return(JsonConvert.SerializeObject(new Dictionary <string, object>
     {
         ["PipDescription"] = perPipInfo.PipDescription,
         ["TelemetryTags"] = perPipInfo.TelemetryTags,
         ["PipExecutionMs"] = perPipInfo.PipExecutionMs,
         ["PeakWorkingMemoryMb"] = perPipInfo.PeakWorkingMemoryMb,
         ["IOReadMb"] = perPipInfo.IOReadMb,
         ["IOWriteMb"] = perPipInfo.IOWriteMb
     }));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Add a Pip into the builds top N pips.
 /// Will be ignored if it's execution time was lower than the minumum execution time of existing N pips.
 /// </summary>
 public bool AddPip(PerProcessPipPerformanceInformation perPipInfo)
 {
     return(m_sortedTopPipPerformanceInfo.TryAdd(perPipInfo.PipExecutionMs, perPipInfo));
 }