Exemple #1
0
        internal static void IncrementStateServiceCounter(StateServicePerfCounter counter)
        {
            if (_stateService == IntPtr.Zero)
            {
                return;
            }
            UnsafeNativeMethods.PerfIncrementCounter(_stateService, (int)counter);

            switch (counter)
            {
            case StateServicePerfCounter.STATE_SERVICE_SESSIONS_TOTAL:
                IncrementGlobalCounter(GlobalPerfCounter.STATE_SERVER_SESSIONS_TOTAL);
                break;

            case StateServicePerfCounter.STATE_SERVICE_SESSIONS_ACTIVE:
                IncrementGlobalCounter(GlobalPerfCounter.STATE_SERVER_SESSIONS_ACTIVE);
                break;

            case StateServicePerfCounter.STATE_SERVICE_SESSIONS_TIMED_OUT:
                IncrementGlobalCounter(GlobalPerfCounter.STATE_SERVER_SESSIONS_TIMED_OUT);
                break;

            case StateServicePerfCounter.STATE_SERVICE_SESSIONS_ABANDONED:
                IncrementGlobalCounter(GlobalPerfCounter.STATE_SERVER_SESSIONS_ABANDONED);
                break;

            default:
                break;
            }
        }
Exemple #2
0
 internal static void IncrementGlobalCounter(GlobalPerfCounter counter)
 {
     if (_global != IntPtr.Zero)
     {
         UnsafeNativeMethods.PerfIncrementCounter(_global, (int)counter);
     }
 }
Exemple #3
0
 internal static void IncrementCounter(AppPerfCounter counter)
 {
     if (_instance != null)
     {
         UnsafeNativeMethods.PerfIncrementCounter(_instance.UnsafeHandle, (int)counter);
     }
 }
 internal /*public*/ static void IncrementGlobalCounter(GlobalPerfCounter counter)
 {
     if (GoingIn())
     {
         try {
             UnsafeNativeMethods.PerfIncrementCounter(_global, (int)counter);
         }
         finally {
             GoingOut();
         }
     }
 }
        // Make sure the Isapi is loaded before attempting to call into it (ASURT 98531)

        internal /*public*/ static void IncrementCounter(AppPerfCounter counter)
        {
            if (GoingIn())
            {
                try {
                    UnsafeNativeMethods.PerfIncrementCounter(_instance, (int)counter);
                }
                finally {
                    GoingOut();
                }
            }
        }