public void Log(RequestLogger requestLogger)
 {
     if (requestLogger == null)
     {
         throw new ArgumentNullException("requestLogger");
     }
     if (this.info == RequestStatistics.Info.TimeTaken)
     {
         requestLogger.AppendToLog <long>(this.Tag.Name, this.TimeTaken);
         return;
     }
     if (this.info == RequestStatistics.Info.RequestCount)
     {
         requestLogger.AppendToLog <int>(this.Tag.Name, this.RequestCount);
         return;
     }
     if ((this.info & RequestStatistics.Info.TimeTaken) != (RequestStatistics.Info) 0)
     {
         requestLogger.AppendToLog <long>(this.Tag.Name + ".T", this.TimeTaken);
     }
     if ((this.info & RequestStatistics.Info.RequestCount) != (RequestStatistics.Info) 0)
     {
         requestLogger.AppendToLog <int>(this.Tag.Name + ".R", this.RequestCount);
     }
     if ((this.info & RequestStatistics.Info.Destination) != (RequestStatistics.Info) 0)
     {
         requestLogger.AppendToLog <string>(this.Tag.Name + ".D", this.Destination);
     }
 }
Esempio n. 2
0
        public void LogThreadsUsage(RequestLogger requestLogger)
        {
            int value;
            int value2;

            ThreadPool.GetAvailableThreads(out value, out value2);
            requestLogger.AppendToLog <int>("Threads.Worker.Available", value);
            requestLogger.AppendToLog <int>("Threads.Worker.InUse", this.Worker.Count);
            requestLogger.AppendToLog <int>("Threads.IO.Available", value2);
            requestLogger.AppendToLog <int>("Threads.IO.InUse", this.IOCompletion.Count);
        }
Esempio n. 3
0
 public void LogStatistics(RequestLogger requestLogger)
 {
     if (this.intraSiteQueryCount > 0)
     {
         requestLogger.AppendToLog <int>("local", this.intraSiteQueryCount);
     }
     if (this.intraSiteProxyQueryCount > 0)
     {
         requestLogger.AppendToLog <int>("intrasiteproxy", this.intraSiteProxyQueryCount);
     }
     if (this.crossSiteQueryCount > 0)
     {
         requestLogger.AppendToLog <int>("x-site", this.crossSiteQueryCount);
     }
     if (this.crossForestQueryCount > 0)
     {
         requestLogger.AppendToLog <int>("x-forest", this.crossForestQueryCount);
     }
     if (this.federatedCrossForestQueryCount > 0)
     {
         requestLogger.AppendToLog <int>("federatedxforest", this.federatedCrossForestQueryCount);
     }
     if (this.publicFolderQueryCount > 0)
     {
         requestLogger.AppendToLog <int>("PF", this.publicFolderQueryCount);
     }
 }