public static PerformanceSampler ForInstance(string instanceName)
 {
     if (samplers.ContainsKey(instanceName))
     {
         return samplers[instanceName];
     }
     lock (samplers)
     {
         if (samplers.ContainsKey(instanceName))
         {
             return samplers[instanceName];
         }
         samplers[instanceName] = new PerformanceSampler(instanceName);
         return samplers[instanceName];
     }
 }
Beispiel #2
0
 public static PerformanceSampler ForInstance(string instanceName)
 {
     if (samplers.ContainsKey(instanceName))
     {
         return(samplers[instanceName]);
     }
     lock (samplers)
     {
         if (samplers.ContainsKey(instanceName))
         {
             return(samplers[instanceName]);
         }
         samplers[instanceName] = new PerformanceSampler(instanceName);
         return(samplers[instanceName]);
     }
 }