1 write to _availableNodes
Microsoft.Build (1)
BackEnd\Components\Scheduler\Scheduler.cs (1)
600_availableNodes = new Dictionary<int, NodeInfo>(8);
25 references to _availableNodes
Microsoft.Build (25)
BackEnd\Components\Scheduler\Scheduler.cs (25)
550_availableNodes[nodeInfo.NodeId] = nodeInfo; 761HashSet<int> idleNodes = new HashSet<int>(_availableNodes.Count); 762foreach (int availableNodeId in _availableNodes.Keys) 787if (_availableNodes.Count > 0) 843TraceScheduler($"Requests scheduled: {nodesFreeToDoWorkPriorToScheduling - idleNodes.Count} Unassigned Requests: {_schedulingData.UnscheduledRequestsCount} Blocked Requests: {_schedulingData.BlockedRequestsCount} Unblockable Requests: {_schedulingData.ReadyRequestsCount} Free Nodes: {idleNodes.Count}/{_availableNodes.Count} Responses: {responses.Count}"); 1093IEnumerable<int> nodesByConfigurationCountAscending = _availableNodes.Keys.OrderBy(x => _schedulingData.GetConfigurationsCountByNode(x, excludeTraversals: true, _configCache)); 1233if (_availableNodes[nodeId].CanServiceRequestWithAffinity(nodeAffinity)) 1358Dictionary<int, int> configurationCountsByNode = new Dictionary<int, int>(_availableNodes.Count); 1364foreach (int availableNodeId in _availableNodes.Keys) 1370configurationCountLimit = Math.Max(1, (int)Math.Ceiling(configurationCountLimit * _customSchedulerForSQLConfigurationLimitMultiplier / _availableNodes.Count)); 1373List<int> nodesByConfigurationCountAscending = new List<int>(_availableNodes.Keys); 1431bool mustSendConfigurationToNode = _availableNodes[nodeId].AssignConfiguration(request.BuildRequest.ConfigurationId); 1520bool result = _availableNodes[nodeId].CanServiceRequestWithAffinity(affinity); 1803if (!_availableNodes[assignedNodeId].CanServiceRequestWithAffinity(GetNodeAffinityForRequest(request))) 1813existingRequestAffinity = (_availableNodes[assignedNodeId].ProviderType == NodeProviderType.InProc) ? NodeAffinity.InProc : NodeAffinity.OutOfProc; 1986foreach (int nodeId in _availableNodes.Keys) 2308foreach (NodeInfo node in _availableNodes.Values) 2407int[] currentWork = new int[_availableNodes.Count]; 2414TimeSpan[] nodeActiveTimes = new TimeSpan[_availableNodes.Count]; 2415DateTime[] nodeStartTimes = new DateTime[_availableNodes.Count]; 2418Dictionary<int, int> availableNodeIdsToIndex = new Dictionary<int, int>(_availableNodes.Count); 2419int[] indexToAvailableNodeId = new int[_availableNodes.Count]; 2422foreach (int availableNodeId in _availableNodes.Keys) 2533loggingService.LogComment(context, MessageImportance.Normal, "NodeUtilizationSummary", utilitzationPercentages.ToString(), (utilizationAverage / (double)_availableNodes.Count) * 100); 2767foreach (int nodeId in _availableNodes.Keys)