Exemplo n.º 1
0
 // Token: 0x06000090 RID: 144 RVA: 0x00004994 File Offset: 0x00002B94
 internal static void Log()
 {
     if (TickDiffer.Elapsed(CPUMemoryLogger.lastLogTime).TotalMinutes > (double)AppSettings.Current.LogCPUMemoryIntervalInMinutes)
     {
         CPUMemoryLogger.lastLogTime = Environment.TickCount;
         HttpLogger.SafeSetLogger(ConfigurationCoreMetadata.CPU, (long)CPUMemoryLogger.ProcessCpuPerfCounter.GetValue() + "% * " + CPUMemoryLogger.ProcessorCount);
         HttpLogger.SafeSetLogger(ConfigurationCoreMetadata.Memory, CPUMemoryLogger.GetMemory());
     }
 }
Exemplo n.º 2
0
 private void OnEndRequest(object sender, EventArgs e)
 {
     ExTraceGlobals.HttpModuleTracer.TraceFunction((long)this.GetHashCode(), "[LoggingEndModule::OnEndRequest] Enter");
     if (HttpLogger.LoggerNotDisposed)
     {
         try
         {
             HttpContext  httpContext = HttpContext.Current;
             HttpResponse response    = httpContext.Response;
             HttpLogger.SafeSetLogger(ConfigurationCoreMetadata.SubStatus, response.SubStatusCode);
             CPUMemoryLogger.Log();
             LatencyTracker latencyTracker = HttpContext.Current.Items["Logging-HttpRequest-Latency"] as LatencyTracker;
             if (latencyTracker != null)
             {
                 long num = latencyTracker.Stop();
                 HttpLogger.SafeSetLogger(ConfigurationCoreMetadata.TotalTime, num);
                 latencyTracker.PushLatencyDetailsToLog(null, null, delegate(string funcName, string totalLatency)
                 {
                     HttpLogger.SafeAppendColumn(RpsCommonMetadata.GenericLatency, funcName, totalLatency);
                 });
                 if (Constants.IsPowerShellWebService)
                 {
                     PswsPerfCounter.UpdatePerfCounter(num);
                 }
                 else
                 {
                     RPSPerfCounter.UpdateAverageRTCounter(num);
                 }
             }
             else
             {
                 HttpLogger.SafeAppendColumn(RpsCommonMetadata.GenericLatency, "LatencyMissed", "httpRequestLatencyTracker is null");
             }
             HttpLogger.SafeAppendGenericInfo("OnEndRequest.End.ContentType", response.ContentType);
         }
         finally
         {
             if (HttpLogger.ActivityScope != null)
             {
                 RequestMonitor.Instance.UnRegisterRequest(HttpLogger.ActivityScope.ActivityId);
             }
             HttpLogger.AsyncCommit(false);
         }
     }
     ExTraceGlobals.HttpModuleTracer.TraceFunction((long)this.GetHashCode(), "[LoggingEndModule::OnEndRequest] Exit");
 }