Exemple #1
0
        // Token: 0x06000182 RID: 386 RVA: 0x0000AB9C File Offset: 0x00008D9C
        public static void DecrementUserPerfCounters(string userName, bool isProxy, bool isLightExperience)
        {
            if (isProxy)
            {
                PerformanceCounterManager.IncrementCurrentUsersCounterBy(OwaSingleCounters.CurrentProxiedUsers, -1L);
                return;
            }
            PerformanceCounterManager.IncrementCurrentUsersCounterBy(OwaSingleCounters.CurrentUsers, -1L);
            UniqueUserData userData = PerformanceCounterManager.GetUserData(userName);

            if (isLightExperience)
            {
                PerformanceCounterManager.IncrementCurrentUsersCounterBy(OwaSingleCounters.CurrentUsersLight, -1L);
                if (userData.CurrentLightSessionCount == 0)
                {
                    PerformanceCounterManager.IncrementCurrentUsersCounterBy(OwaSingleCounters.CurrentUniqueUsersLight, -1L);
                }
            }
            else
            {
                PerformanceCounterManager.IncrementCurrentUsersCounterBy(OwaSingleCounters.CurrentUsersPremium, -1L);
                if (userData.CurrentPremiumSessionCount == 0)
                {
                    PerformanceCounterManager.IncrementCurrentUsersCounterBy(OwaSingleCounters.CurrentUniqueUsersPremium, -1L);
                }
            }
            if (userData.CurrentSessionCount == 0)
            {
                PerformanceCounterManager.IncrementCurrentUsersCounterBy(OwaSingleCounters.CurrentUniqueUsers, -1L);
            }
        }
Exemple #2
0
        // Token: 0x06000183 RID: 387 RVA: 0x0000AC28 File Offset: 0x00008E28
        public static void UpdatePerfCounteronUserContextCreation(string userName, bool isProxy, bool isLightExperience, bool arePerfCountersEnabled)
        {
            if (arePerfCountersEnabled)
            {
                PerformanceCounterManager.IncrementUserPerfCounters(userName, isProxy, isLightExperience);
            }
            UniqueUserData userData = PerformanceCounterManager.GetUserData(userName);

            userData.IncreaseSessionCounter(isProxy, isLightExperience);
        }
Exemple #3
0
        // Token: 0x06000184 RID: 388 RVA: 0x0000AC50 File Offset: 0x00008E50
        public static void UpdatePerfCounteronUserContextDeletion(string userName, bool isProxy, bool isLightExperience, bool arePerfCountersEnabled)
        {
            if (string.IsNullOrEmpty(userName))
            {
                ExTraceGlobals.CoreTracer.TraceError(0L, "UpdatePerfCounteronUserContextDeletion got null or empty value for parameter 'userName'.");
                return;
            }
            UniqueUserData uniqueUserData = PerformanceCounterManager.GetUniqueUserData(userName);

            uniqueUserData.DecreaseSessionCounter(isProxy, isLightExperience);
            if (arePerfCountersEnabled)
            {
                PerformanceCounterManager.DecrementUserPerfCounters(userName, isProxy, isLightExperience);
            }
        }
Exemple #4
0
        // Token: 0x0600016D RID: 365 RVA: 0x0000A4B4 File Offset: 0x000086B4
        public static UniqueUserData GetUniqueUserData(string userName)
        {
            UniqueUserData result;

            lock (PerformanceCounterManager.uniqueUserTable)
            {
                UniqueUserData uniqueUserData = null;
                if (!PerformanceCounterManager.uniqueUserTable.TryGetValue(userName, out uniqueUserData))
                {
                    result = null;
                }
                else
                {
                    result = uniqueUserData;
                }
            }
            return(result);
        }
Exemple #5
0
        // Token: 0x06000180 RID: 384 RVA: 0x0000A9C8 File Offset: 0x00008BC8
        public static UniqueUserData GetUserData(string userName, out bool isNewUser)
        {
            UniqueUserData uniqueUserData = null;

            lock (PerformanceCounterManager.uniqueUserTable)
            {
                if (!PerformanceCounterManager.uniqueUserTable.ContainsKey(userName))
                {
                    uniqueUserData = new UniqueUserData();
                    PerformanceCounterManager.uniqueUserTable.Add(userName, uniqueUserData);
                    isNewUser = true;
                }
                else
                {
                    uniqueUserData = PerformanceCounterManager.uniqueUserTable[userName];
                    isNewUser      = false;
                }
            }
            return(uniqueUserData);
        }
Exemple #6
0
        // Token: 0x06000181 RID: 385 RVA: 0x0000AA38 File Offset: 0x00008C38
        public static void IncrementUserPerfCounters(string userName, bool isProxy, bool isLightExperience)
        {
            if (isProxy)
            {
                PerformanceCounterManager.IncrementCurrentUsersCounterBy(OwaSingleCounters.CurrentProxiedUsers, 1L);
                return;
            }
            bool           flag;
            UniqueUserData userData = PerformanceCounterManager.GetUserData(userName, out flag);

            if (flag)
            {
                OwaSingleCounters.TotalUniqueUsers.Increment();
            }
            if (userData.CurrentSessionCount == 0)
            {
                PerformanceCounterManager.IncrementCurrentUsersCounterBy(OwaSingleCounters.CurrentUniqueUsers, 1L);
            }
            if (isLightExperience)
            {
                if (userData.CurrentLightSessionCount == 0)
                {
                    PerformanceCounterManager.IncrementCurrentUsersCounterBy(OwaSingleCounters.CurrentUniqueUsersLight, 1L);
                }
                if (userData.IsFirstLightSession)
                {
                    OwaSingleCounters.TotalUniqueUsersLight.Increment();
                }
            }
            else
            {
                if (userData.CurrentPremiumSessionCount == 0)
                {
                    PerformanceCounterManager.IncrementCurrentUsersCounterBy(OwaSingleCounters.CurrentUniqueUsersPremium, 1L);
                }
                if (userData.IsFirstPremiumSession)
                {
                    OwaSingleCounters.TotalUniqueUsersPremium.Increment();
                }
            }
            PerformanceCounterManager.IncrementCurrentUsersCounterBy(OwaSingleCounters.CurrentUsers, 1L);
            OwaSingleCounters.TotalUsers.Increment();
            if (OwaSingleCounters.CurrentUsers.RawValue > OwaSingleCounters.PeakUserCount.RawValue)
            {
                OwaSingleCounters.PeakUserCount.RawValue = OwaSingleCounters.CurrentUsers.RawValue;
            }
            if (isLightExperience)
            {
                PerformanceCounterManager.IncrementCurrentUsersCounterBy(OwaSingleCounters.CurrentUsersLight, 1L);
                OwaSingleCounters.TotalUsersLight.Increment();
                if (OwaSingleCounters.CurrentUsersLight.RawValue > OwaSingleCounters.PeakUserCountLight.RawValue)
                {
                    OwaSingleCounters.PeakUserCountLight.RawValue = OwaSingleCounters.CurrentUsersLight.RawValue;
                    return;
                }
            }
            else
            {
                PerformanceCounterManager.IncrementCurrentUsersCounterBy(OwaSingleCounters.CurrentUsersPremium, 1L);
                OwaSingleCounters.TotalUsersPremium.Increment();
                if (OwaSingleCounters.CurrentUsersPremium.RawValue > OwaSingleCounters.PeakUserCountPremium.RawValue)
                {
                    OwaSingleCounters.PeakUserCountPremium.RawValue = OwaSingleCounters.CurrentUsersPremium.RawValue;
                }
            }
        }