Exemple #1
0
        public static void defaultLoadBalancerUpdateInterval(ConsoleSystem.Arg args)
        {
            LoadBalancedQueue num = LoadBalancer.defaultBalancer as LoadBalancedQueue;

            if (num != null)
            {
                num.defaultUpdateInterval = args.GetFloat(0, num.defaultUpdateInterval);
            }
        }
Exemple #2
0
        public static void NpcSenseLoadBalancerUpdateInterval(ConsoleSystem.Arg args)
        {
            LoadBalancedQueue npcSensesLoadBalancer = NPCSensesLoadBalancer.NpcSensesLoadBalancer as LoadBalancedQueue;

            if (npcSensesLoadBalancer != null)
            {
                npcSensesLoadBalancer.defaultUpdateInterval = args.GetFloat(0, npcSensesLoadBalancer.defaultUpdateInterval);
            }
        }
        internal void ApplyTo(LoadBalancedQueue q)
        {
            q.defaultUpdateInterval = this.updateInterval;
            q.maxUpdatesPerInterval = this.maxUpdatesPerFrame;
            q.maxUpdateTimeInMillisecondsPerUpdate = this.maxUpdateTimeInMillisecondsPerUpdate;
            q.autoAdjust = this.autoAdjust;

            this.associatedLoadBalancer = q;
        }
Exemple #4
0
        public static void AnimalSenseLoadBalancerUpdateInterval(Arg args)
        {
            LoadBalancedQueue loadBalancedQueue = AnimalSensesLoadBalancer.animalSensesLoadBalancer as LoadBalancedQueue;

            if (loadBalancedQueue != null)
            {
                loadBalancedQueue.defaultUpdateInterval = args.GetFloat(0, loadBalancedQueue.defaultUpdateInterval);
            }
        }
Exemple #5
0
        public static void defaultLoadBalancerUpdateInterval(Arg args)
        {
            LoadBalancedQueue loadBalancedQueue = Apex.LoadBalancing.LoadBalancer.defaultBalancer as LoadBalancedQueue;

            if (loadBalancedQueue != null)
            {
                loadBalancedQueue.defaultUpdateInterval = args.GetFloat(0, loadBalancedQueue.defaultUpdateInterval);
            }
        }
Exemple #6
0
        public static void aiManagerLoadBalancerUpdateInterval(Arg args)
        {
            LoadBalancedQueue loadBalancedQueue = AiManagerLoadBalancer.aiManagerLoadBalancer as LoadBalancedQueue;

            if (loadBalancedQueue != null)
            {
                loadBalancedQueue.defaultUpdateInterval = args.GetFloat(0, loadBalancedQueue.defaultUpdateInterval);
            }
        }
 internal static LoadBalancerConfig From(string name, LoadBalancedQueue q)
 {
     return new LoadBalancerConfig
     {
         associatedLoadBalancer = q,
         autoAdjust = q.autoAdjust,
         maxUpdatesPerFrame = q.maxUpdatesPerInterval,
         maxUpdateTimeInMillisecondsPerUpdate = q.maxUpdateTimeInMillisecondsPerUpdate,
         updateInterval = q.defaultUpdateInterval,
         targetLoadBalancer = name
     };
 }
Exemple #8
0
 private static void AddLBTableEntry(ref TextTable table, string name, LoadBalancedQueue lb)
 {
     if (lb != null)
     {
         float num = 0f;
         if (lb.updatedItemsCount > 0)
         {
             num = Mathf.Clamp(lb.updatesOverdueByTotal / (float)lb.updatedItemsCount - 0.02f, 0f, float.MaxValue);
         }
         table.AddRow(name, lb.itemCount.ToString(), num.ToString("N2"));
     }
 }
Exemple #9
0
        private static void AddLBTableEntry(ref TextTable table, string name, LoadBalancedQueue lb)
        {
            if (lb == null)
            {
                return;
            }
            float single = 0f;

            if (lb.updatedItemsCount > 0)
            {
                single = Mathf.Clamp(lb.updatesOverdueByTotal / (float)lb.updatedItemsCount - 0.02f, 0f, Single.MaxValue);
            }
            string[] str = new string[] { name, null, null };
            str[1] = lb.itemCount.ToString();
            str[2] = single.ToString("N2");
            table.AddRow(str);
        }
Exemple #10
0
        private static void AddLBTableEntry(ref TextTable table, string name, LoadBalancedQueue lb)
        {
            if (lb == null)
            {
                return;
            }
            float num = 0.0f;

            if (lb.get_updatedItemsCount() > 0)
            {
                num = Mathf.Clamp((float)((double)lb.get_updatesOverdueByTotal() / (double)lb.get_updatedItemsCount() - 0.0199999995529652), 0.0f, float.MaxValue);
            }
            table.AddRow(new string[3]
            {
                name,
                lb.get_itemCount().ToString(),
                num.ToString("N2")
            });
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="PerformanceData"/> class.
 /// </summary>
 /// <param name="source">The source.</param>
 /// <param name="loadBalancerName">The name of the load balancer</param>
 public PerformanceData(LoadBalancedQueue source, string loadBalancerName)
 {
     _source = source;
     this.loadBalancerName = loadBalancerName;
 }
Exemple #12
0
        public static void AnimalSenseLoadBalancerUpdateInterval(ConsoleSystem.Arg args)
        {
            LoadBalancedQueue sensesLoadBalancer = AnimalSensesLoadBalancer.animalSensesLoadBalancer as LoadBalancedQueue;

            sensesLoadBalancer?.set_defaultUpdateInterval(args.GetFloat(0, sensesLoadBalancer.get_defaultUpdateInterval()));
        }
Exemple #13
0
        public static void aiLoadBalancerUpdateInterval(ConsoleSystem.Arg args)
        {
            LoadBalancedQueue aiLoadBalancer = AILoadBalancer.aiLoadBalancer as LoadBalancedQueue;

            aiLoadBalancer?.set_defaultUpdateInterval(args.GetFloat(0, aiLoadBalancer.get_defaultUpdateInterval()));
        }
Exemple #14
0
        public static void defaultLoadBalancerUpdateInterval(ConsoleSystem.Arg args)
        {
            LoadBalancedQueue defaultBalancer = LoadBalancer.defaultBalancer as LoadBalancedQueue;

            defaultBalancer?.set_defaultUpdateInterval(args.GetFloat(0, defaultBalancer.get_defaultUpdateInterval()));
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="PerformanceData"/> class.
 /// </summary>
 /// <param name="source">The source.</param>
 /// <param name="loadBalancerName">The name of the load balancer</param>
 public PerformanceData(LoadBalancedQueue source, string loadBalancerName)
 {
     _source = source;
     this.loadBalancerName = loadBalancerName;
 }