1 instantiation of SchedulableRequest
Microsoft.Build (1)
BackEnd\Components\Scheduler\SchedulingData.cs (1)
269SchedulableRequest request = new SchedulableRequest(this, buildRequest, parent);
206 references to SchedulableRequest
Microsoft.Build (206)
BackEnd\Components\Scheduler\SchedulableRequest.cs (36)
86private SchedulableRequest _parent; 97private Dictionary<BlockingRequestKey, SchedulableRequest> _requestsWeAreBlockedBy; 102private HashSet<SchedulableRequest> _requestsWeAreBlocking; 127public SchedulableRequest(SchedulingData collection, BuildRequest request, SchedulableRequest parent) 137_requestsWeAreBlockedBy = new Dictionary<BlockingRequestKey, SchedulableRequest>(); 138_requestsWeAreBlocking = new HashSet<SchedulableRequest>(); 170public SchedulableRequest Parent 214public IEnumerable<SchedulableRequest> RequestsWeAreBlockedBy 236public IEnumerable<SchedulableRequest> RequestsWeAreBlocking 335public void BlockByRequest(SchedulableRequest blockingRequest, string[] activeTargets, string blockingTarget = null) 424List<SchedulableRequest> requestsToUnblock = new List<SchedulableRequest>(_requestsWeAreBlocking); 425foreach (SchedulableRequest requestWeAreBlocking in requestsToUnblock) 498private void DetectCircularDependency(SchedulableRequest blockingRequest) 515private void DetectIndirectCircularDependency(SchedulableRequest blockingRequest) 519SchedulableRequest alternateRequest = _schedulingData.GetBlockedRequestIfAny(blockingRequest.BuildRequest.GlobalRequestId); 525Stack<SchedulableRequest> requestsToEvaluate = new Stack<SchedulableRequest>(16); 526HashSet<SchedulableRequest> evaluatedRequests = new HashSet<SchedulableRequest>(); 531SchedulableRequest requestToEvaluate = requestsToEvaluate.Pop(); 555foreach (SchedulableRequest childRequest in requestToEvaluate.RequestsWeAreBlockedBy) 568private void ThrowIndirectCircularDependency(SchedulableRequest blockingRequest, SchedulableRequest requestToEvaluate) 572List<SchedulableRequest> ancestors = new List<SchedulableRequest>(16); 586private void DetectDirectCircularDependency(SchedulableRequest blockingRequest) 590List<SchedulableRequest> ancestors = new List<SchedulableRequest>(16); 591SchedulableRequest currentRequest = this; 609private void CleanupForCircularDependencyAndThrow(SchedulableRequest requestCausingFailure, List<SchedulableRequest> ancestors) 613List<SchedulableRequest> tempRequests = new List<SchedulableRequest>(_requestsWeAreBlockedBy.Values); 614foreach (SchedulableRequest requestWeAreBlockedBy in tempRequests) 641ErrorUtilities.VerifyThrow(_requestsWeAreBlockedBy.TryGetValue(blockingRequestKey, out SchedulableRequest unblockingRequest), "We are not blocked by the specified request.");
BackEnd\Components\Scheduler\Scheduler.cs (77)
296SchedulableRequest request = _schedulingData.GetExecutingRequestByNode(nodeId); 309SchedulableRequest parentRequest = null; 394SchedulableRequest request = _schedulingData.GetExecutingRequest(result.GlobalRequestId); 434List<SchedulableRequest> unscheduledRequests = new List<SchedulableRequest>(_schedulingData.UnscheduledRequests); 435foreach (SchedulableRequest unscheduledRequest in unscheduledRequests) 527foreach (SchedulableRequest request in _schedulingData.GetScheduledRequestsByNode(nodeId)) 561foreach (SchedulableRequest request in _schedulingData.GetRequestsByHierarchy(null)) 658private void HandleYieldAction(SchedulableRequest parentRequest, BuildRequestBlocker blocker) 753foreach (SchedulableRequest request in _schedulingData.BlockedRequests) 939SchedulableRequest bestRequest = null; 942foreach (SchedulableRequest request in _schedulingData.UnscheduledRequestsWhichCanBeScheduled) 991private void AssignUnscheduledRequestsToInProcNode(List<ScheduleResponse> responses, HashSet<int> idleNodes, Func<SchedulableRequest, bool> shouldBeScheduled) 995List<SchedulableRequest> unscheduledRequests = new List<SchedulableRequest>(_schedulingData.UnscheduledRequestsWhichCanBeScheduled); 996foreach (SchedulableRequest request in unscheduledRequests) 1042foreach (SchedulableRequest request in _schedulingData.UnscheduledRequestsWhichCanBeScheduled) 1066SchedulableRequest requestWithSmallestSourceFile = null; 1070foreach (SchedulableRequest unscheduledRequest in _schedulingData.UnscheduledRequestsWhichCanBeScheduled) 1108SchedulableRequest requestWithLargestSourceFile = null; 1112foreach (SchedulableRequest unscheduledRequest in _schedulingData.UnscheduledRequestsWhichCanBeScheduled) 1151SchedulableRequest requestToSchedule = null; 1152SchedulableRequest requestToScheduleNoAffinity = null; 1153SchedulableRequest requestToScheduleWithAffinity = null; 1154foreach (SchedulableRequest currentSchedulableRequest in _schedulingData.UnscheduledRequestsWhichCanBeScheduled) 1228SchedulableRequest mostWaitingRequests = null; 1229foreach (SchedulableRequest unscheduledRequest in _schedulingData.UnscheduledRequestsWhichCanBeScheduled) 1262foreach (SchedulableRequest unscheduledRequest in _schedulingData.UnscheduledRequestsWhichCanBeScheduled) 1326foreach (SchedulableRequest request in _schedulingData.UnscheduledRequestsWhichCanBeScheduled) 1355private void AssignUnscheduledRequestToNode(SchedulableRequest request, int nodeId, List<ScheduleResponse> responses) 1450private bool CanScheduleRequestToNode(SchedulableRequest request, int nodeId) 1474private bool CreateNewNodeIfPossible(List<ScheduleResponse> responses, IEnumerable<SchedulableRequest> requests) 1484foreach (SchedulableRequest request in requests) 1606private void MarkRequestAborted(SchedulableRequest request) 1611foreach (SchedulableRequest blockedRequest in request.RequestsWeAreBlocking) 1620private void HandleRequestBlockedOnInProgressTarget(SchedulableRequest blockedRequest, BuildRequestBlocker blocker) 1626SchedulableRequest blockingRequest = _schedulingData.GetScheduledRequest(blocker.BlockingRequestId); 1651private void HandleRequestBlockedOnResultsTransfer(SchedulableRequest parentRequest, List<ScheduleResponse> responses) 1679private void HandleRequestBlockedByNewRequests(SchedulableRequest parentRequest, BuildRequestBlocker blocker, List<ScheduleResponse> responses) 1749foreach (SchedulableRequest existingRequest in _schedulingData.GetRequestsAssignedToConfiguration(request.ConfigurationId)) 1810SchedulableRequest blockingRequest = _schedulingData.CreateRequest(requestToAdd, parentRequest); 1825foreach (SchedulableRequest request in _schedulingData.GetReadyRequestsByNode(nodeId)) 1842private void ResolveRequestFromCacheAndResumeIfPossible(SchedulableRequest request, List<ScheduleResponse> responses) 1937List<SchedulableRequest> unscheduledRequests = new List<SchedulableRequest>(_schedulingData.UnscheduledRequests); 1938foreach (SchedulableRequest request in unscheduledRequests) 2033SchedulableRequest parentRequest = _schedulingData.BlockedRequests.FirstOrDefault(r => r.BuildRequest.GlobalRequestId == request.ParentGlobalRequestId) 2145private int ComputeClosureOfWaitingRequests(SchedulableRequest request) 2152foreach (SchedulableRequest waitingRequest in request.RequestsWeAreBlocking) 2214private bool RequestOrAnyItIsBlockedByCanBeServiced(SchedulableRequest request) 2218foreach (SchedulableRequest requestWeAreBlockedBy in request.RequestsWeAreBlockedBy) 2260foreach (SchedulableRequest existingRequest in _schedulingData.GetRequestsAssignedToConfiguration(request.ConfigurationId)) 2500private void WriteRecursiveSummary(ILoggingService loggingService, BuildEventContext context, int submissionId, SchedulableRequest request, int level, bool useConfigurations, bool isLastChild) 2537List<SchedulableRequest> childRequests = new List<SchedulableRequest>(_schedulingData.GetRequestsByHierarchy(request)); 2538childRequests.Sort(delegate (SchedulableRequest left, SchedulableRequest right) 2554SchedulableRequest childRequest = childRequests[i]; 2616List<SchedulableRequest> scheduledRequestsByNode = new List<SchedulableRequest>(_schedulingData.GetScheduledRequestsByNode(nodeId)); 2618foreach (SchedulableRequest request in scheduledRequestsByNode) 2636Queue<SchedulableRequest> blockingRequests = new Queue<SchedulableRequest>(); 2637HashSet<SchedulableRequest> topLevelBlockingRequests = new HashSet<SchedulableRequest>(); 2638foreach (SchedulableRequest request in scheduledRequestsByNode) 2642foreach (SchedulableRequest blockingRequest in request.RequestsWeAreBlockedBy) 2651SchedulableRequest request = blockingRequests.Dequeue(); 2655foreach (SchedulableRequest blockingRequest in request.RequestsWeAreBlockedBy) 2666foreach (SchedulableRequest request in topLevelBlockingRequests) 2683foreach (SchedulableRequest request in _schedulingData.UnscheduledRequests) 2769private void DumpRequestHierarchy(StreamWriter file, SchedulableRequest root, int indent) 2771foreach (SchedulableRequest child in _schedulingData.GetRequestsByHierarchy(root)) 2781private void DumpRequestState(StreamWriter file, SchedulableRequest request, int indent) 2786foreach (SchedulableRequest blockingRequest in request.RequestsWeAreBlockedBy) 2794foreach (SchedulableRequest blockedRequest in request.RequestsWeAreBlocking) 2804private void DumpRequestSpec(StreamWriter file, SchedulableRequest request, int indent, string prefix)
BackEnd\Components\Scheduler\SchedulerCircularDependencyException.cs (3)
23private IList<SchedulableRequest> _ancestors; 33public SchedulerCircularDependencyException(BuildRequest request, IList<SchedulableRequest> ancestors) 47public IEnumerable<SchedulableRequest> Ancestors
BackEnd\Components\Scheduler\SchedulingData.cs (80)
24private readonly Dictionary<int, SchedulableRequest> _executingRequests = new Dictionary<int, SchedulableRequest>(32); 29private readonly Dictionary<int, SchedulableRequest> _blockedRequests = new Dictionary<int, SchedulableRequest>(32); 34private readonly Dictionary<int, SchedulableRequest> _yieldingRequests = new Dictionary<int, SchedulableRequest>(32); 39private readonly Dictionary<int, SchedulableRequest> _readyRequests = new Dictionary<int, SchedulableRequest>(32); 44private readonly LinkedList<SchedulableRequest> _unscheduledRequests = new LinkedList<SchedulableRequest>(); 50private readonly Dictionary<SchedulableRequest, LinkedListNode<SchedulableRequest>> _unscheduledRequestNodesByRequest = new Dictionary<SchedulableRequest, LinkedListNode<SchedulableRequest>>(32); 59private readonly Dictionary<int, HashSet<SchedulableRequest>> _scheduledRequestsByNode = new Dictionary<int, HashSet<SchedulableRequest>>(32); 64private readonly Dictionary<int, SchedulableRequest> _executingRequestByNode = new Dictionary<int, SchedulableRequest>(32); 69private readonly Dictionary<int, HashSet<SchedulableRequest>> _readyRequestsByNode = new Dictionary<int, HashSet<SchedulableRequest>>(32); 87private readonly Dictionary<int, HashSet<SchedulableRequest>> _configurationToRequests = new Dictionary<int, HashSet<SchedulableRequest>>(32); 105private readonly Dictionary<SchedulableRequest, List<SchedulableRequest>> _buildHierarchy = new Dictionary<SchedulableRequest, List<SchedulableRequest>>(32); 137public IEnumerable<SchedulableRequest> ExecutingRequests 153public IEnumerable<SchedulableRequest> ReadyRequests 177public IEnumerable<SchedulableRequest> BlockedRequests 193public IEnumerable<SchedulableRequest> YieldingRequests 209public IEnumerable<SchedulableRequest> UnscheduledRequests 225public IEnumerable<SchedulableRequest> UnscheduledRequestsWhichCanBeScheduled 229foreach (SchedulableRequest request in _unscheduledRequests) 267public SchedulableRequest CreateRequest(BuildRequest buildRequest, SchedulableRequest parent) 269SchedulableRequest request = new SchedulableRequest(this, buildRequest, parent); 272LinkedListNode<SchedulableRequest> requestNode = _unscheduledRequests.AddFirst(request); 276HashSet<SchedulableRequest> requests; 279requests = new HashSet<SchedulableRequest>(); 288_buildHierarchy[request] = new List<SchedulableRequest>(8); 303public void UpdateFromState(SchedulableRequest request, SchedulableRequestState previousState) 331LinkedListNode<SchedulableRequest> requestNode = _unscheduledRequestNodesByRequest[request]; 338HashSet<SchedulableRequest> requestsAssignedToNode; 341requestsAssignedToNode = new HashSet<SchedulableRequest>(); 407HashSet<SchedulableRequest> readyRequestsOnNode; 410readyRequestsOnNode = new HashSet<SchedulableRequest>(); 429public IEnumerable<SchedulableRequest> GetRequestsAssignedToConfiguration(int configurationId) 439HashSet<SchedulableRequest> requests; 451public SchedulableRequest GetExecutingRequest(int globalRequestId) 460public SchedulableRequest GetBlockedRequest(int globalRequestId) 469public SchedulableRequest GetBlockedRequestIfAny(int globalRequestId) 471SchedulableRequest request; 483public SchedulableRequest GetYieldingRequest(int globalRequestId) 492public SchedulableRequest GetReadyRequest(int globalRequestId) 501public SchedulableRequest GetScheduledRequest(int globalRequestId) 503SchedulableRequest returnValue = InternalGetScheduledRequestByGlobalRequestId(globalRequestId); 513SchedulableRequest request; 552public SchedulableRequest GetExecutingRequestByNode(int nodeId) 560public bool IsRequestScheduled(SchedulableRequest request) 570HashSet<SchedulableRequest> requests; 582public IEnumerable<SchedulableRequest> GetScheduledRequestsByNode(int nodeId) 584HashSet<SchedulableRequest> requests; 587return ReadOnlyEmptyCollection<SchedulableRequest>.Instance; 596public IEnumerable<SchedulableRequest> GetReadyRequestsByNode(int nodeId) 598HashSet<SchedulableRequest> requests; 601return ReadOnlyEmptyCollection<SchedulableRequest>.Instance; 611public IEnumerable<SchedulableRequest> GetRequestsByHierarchy(SchedulableRequest root) 616List<SchedulableRequest> roots = new List<SchedulableRequest>(); 617foreach (SchedulableRequest key in _buildHierarchy.Keys) 649public bool CanScheduleRequestToNode(SchedulableRequest request, int nodeId) 666SchedulableRequest request = GetScheduledRequest(globalRequestId); 679SchedulableRequest request = GetScheduledRequest(globalRequestId); 706private SchedulableRequest InternalGetScheduledRequestByGlobalRequestId(int globalRequestId) 708SchedulableRequest returnValue; 737SchedulableRequest request = InternalGetScheduledRequestByGlobalRequestId(globalRequestId); 761private SchedulableRequest _request; 776public SchedulingEvent(DateTime eventTime, SchedulableRequest request, SchedulableRequestState oldState, SchedulableRequestState newState) 795public SchedulableRequest Request
BackEnd\Components\Scheduler\SchedulingPlan.cs (10)
93SchedulableRequest rootRequest = GetRootRequest(submissionId); 142SchedulableRequest rootRequest = GetRootRequest(submissionId); 204private string GetPlanName(SchedulableRequest rootRequest) 426private SchedulableRequest GetRootRequest(int submissionId) 428foreach (SchedulableRequest request in _schedulingData.GetRequestsByHierarchy(null)) 442private void RecursiveWriteDependencies(StreamWriter file, SchedulableRequest request) 445foreach (SchedulableRequest child in _schedulingData.GetRequestsByHierarchy(request)) 452foreach (SchedulableRequest child in _schedulingData.GetRequestsByHierarchy(request)) 461private void RecursiveAccumulateConfigurationTimes(SchedulableRequest request, Dictionary<int, double> accumulatedTimeByConfiguration) 470foreach (SchedulableRequest childRequest in _schedulingData.GetRequestsByHierarchy(request))