Exemplo n.º 1
0
 internal override void MergeInto(Dictionary <Guid, UserProviderInfo> userInfo, KernelProviderInfo kernelInfo, Dictionary <string, CpuCounterInfo> cpuInfo)
 {
     if (!cpuInfo.TryGetValue(CounterName, out var current))
     {
         cpuInfo.Add(CounterName, this);
     }
     else
     {
         cpuInfo[CounterName] = new CpuCounterInfo()
         {
             CounterName = CounterName,
             Interval    = Math.Min(current.Interval, Interval)
         };
     }
 }
Exemplo n.º 2
0
 internal override void MergeInto(Dictionary<Guid, UserProviderInfo> userInfo, KernelProviderInfo kernelInfo, Dictionary<string, CpuCounterInfo> cpuInfo)
 {
     CpuCounterInfo current;
     if (!cpuInfo.TryGetValue(CounterName, out current))
     {
         cpuInfo.Add(CounterName, this);
     }
     else
     {
         cpuInfo[CounterName] = new CpuCounterInfo()
         {
             CounterName = this.CounterName,
             Interval = Math.Min(current.Interval, this.Interval)
         };
     }
 }