Пример #1
0
 private static void ResetHttpProxyPerArrayCounters(string excludeInstanceName)
 {
     foreach (string text in HttpProxyPerArrayCounters.GetInstanceNames())
     {
         if (!string.Equals(text, excludeInstanceName, StringComparison.OrdinalIgnoreCase))
         {
             HttpProxyPerArrayCounters.ResetInstance(text);
         }
     }
 }
Пример #2
0
        internal static void UpdateHttpProxyPerArrayCounters()
        {
            ClientAccessArray localServerClientAccessArray = Server.GetLocalServerClientAccessArray();

            if (localServerClientAccessArray == null)
            {
                PerfCounters.ResetHttpProxyPerArrayCounters(null);
                return;
            }
            HttpProxyPerArrayCountersInstance instance = HttpProxyPerArrayCounters.GetInstance(localServerClientAccessArray.Name);

            if (instance != null)
            {
                PerfCounters.ResetHttpProxyPerArrayCounters(localServerClientAccessArray.Name);
                instance.TotalServersInArray.RawValue = (long)Math.Max(1, localServerClientAccessArray.ServerCount);
            }
        }