예제 #1
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];
     }
 }
예제 #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]);
     }
 }