public static void IncrementAgentSubmissionFailure(string agentName)
 {
     StoreDriverSubmissionAgentPerfCounters.InstanceEntry instanceEntry = StoreDriverSubmissionAgentPerfCounters.GetInstanceEntry(agentName);
     if (instanceEntry != null)
     {
         instanceEntry.SubmissionAgentFailuresCounter.AddNumerator(1L);
     }
 }
 public static void RefreshAgentSubmissionPercentCounter(string agentName)
 {
     StoreDriverSubmissionAgentPerfCounters.InstanceEntry instanceEntry = StoreDriverSubmissionAgentPerfCounters.GetInstanceEntry(agentName);
     if (instanceEntry != null)
     {
         lock (MSExchangeStoreDriverSubmissionAgent.TotalInstance.SubmissionAgentFailures)
         {
             instanceEntry.PerfCounterInstance.SubmissionAgentFailures.RawValue = (long)instanceEntry.SubmissionAgentFailuresCounter.GetSlidingPercentage();
         }
     }
 }