public IPerformanceCounterToken BeginPageHookCreation()
        {
            WindowsPerformanceCounterProviderToken windowsPerformanceCounterProviderToken = new WindowsPerformanceCounterProviderToken();

            windowsPerformanceCounterProviderToken.Start();
            return(windowsPerformanceCounterProviderToken);
        }
        public IPerformanceCounterToken BeginAspNetControlCompile()
        {
            WindowsPerformanceCounterProviderToken windowsPerformanceCounterProviderToken = new WindowsPerformanceCounterProviderToken();

            windowsPerformanceCounterProviderToken.Start();
            return(windowsPerformanceCounterProviderToken);
        }
        public void EndAspNetControlCompile(IPerformanceCounterToken performanceToken, int controlsCompiledCount)
        {
            WindowsPerformanceCounterProviderToken windowsPerformanceCounterProviderToken = (WindowsPerformanceCounterProviderToken)performanceToken;

            windowsPerformanceCounterProviderToken.Stop();

            if ((_aspNetControlCompileAverageTime != null) &&
                (_aspNetControlCompileAverageTimeBase != null))
            {
                _aspNetControlCompileAverageTime.IncrementBy(windowsPerformanceCounterProviderToken.StopTicks - windowsPerformanceCounterProviderToken.StartTicks);
                _aspNetControlCompileAverageTimeBase.IncrementBy(controlsCompiledCount);
            }
        }
        public void EndPageHookCreation(IPerformanceCounterToken performanceToken, int pageCount)
        {
            WindowsPerformanceCounterProviderToken windowsPerformanceCounterProviderToken = (WindowsPerformanceCounterProviderToken)performanceToken;

            windowsPerformanceCounterProviderToken.Stop();

            if ((_pageHookCreationAverageTime != null) &&
                (_pageHookCreationAverageTimeBase != null))
            {
                _pageHookCreationAverageTime.IncrementBy(windowsPerformanceCounterProviderToken.StopTicks - windowsPerformanceCounterProviderToken.StartTicks);
                _pageHookCreationAverageTimeBase.IncrementBy(pageCount);
            }
        }
        public void EndElementCreation(IPerformanceCounterToken performanceToken, int resultElementCount, int totalElementCount)
        {
            WindowsPerformanceCounterProviderToken windowsPerformanceCounterProviderToken = (WindowsPerformanceCounterProviderToken)performanceToken;

            windowsPerformanceCounterProviderToken.Stop();

            if ((_elementResultCreationAverageTime != null) &&
                (_elementResultCreationAverageTime != null) &&
                (_elementResultCreationAverageTimeBase != null) &&
                (_elementTotalCreationAverageTimeBase != null))
            {
                _elementResultCreationAverageTime.IncrementBy(windowsPerformanceCounterProviderToken.StopTicks - windowsPerformanceCounterProviderToken.StartTicks);
                _elementTotalCreationAverageTime.IncrementBy(windowsPerformanceCounterProviderToken.StopTicks - windowsPerformanceCounterProviderToken.StartTicks);
                _elementResultCreationAverageTimeBase.IncrementBy(resultElementCount);
                _elementTotalCreationAverageTimeBase.IncrementBy(totalElementCount);
            }
        }
コード例 #6
0
 public IPerformanceCounterToken BeginPageHookCreation()
 {
     WindowsPerformanceCounterProviderToken windowsPerformanceCounterProviderToken = new WindowsPerformanceCounterProviderToken();
     windowsPerformanceCounterProviderToken.Start();
     return windowsPerformanceCounterProviderToken;
 }
コード例 #7
0
 public IPerformanceCounterToken BeginAspNetControlCompile()
 {
     WindowsPerformanceCounterProviderToken windowsPerformanceCounterProviderToken = new WindowsPerformanceCounterProviderToken();
     windowsPerformanceCounterProviderToken.Start();
     return windowsPerformanceCounterProviderToken;
 }