コード例 #1
0
        // Token: 0x060000E6 RID: 230 RVA: 0x000066B0 File Offset: 0x000048B0
        internal static void UpdatePerfCounter(long totalRequestTime)
        {
            if (PswsPerfCounter.perfCounter == null)
            {
                PswsPerfCounter.InitializePerfCounter();
            }
            long averageResponseTime = PswsPerfCounter.averageRT.GetAverageResponseTime(totalRequestTime, PswsPerfCounter.perfCounter.AverageResponseTime.RawValue);

            if (averageResponseTime != 0L)
            {
                PswsPerfCounter.perfCounter.AverageResponseTime.RawValue = averageResponseTime;
            }
        }
コード例 #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");
 }