88 references to SchedulableRequestState
Microsoft.Build (88)
BackEnd\Components\Scheduler\SchedulableRequest.cs (51)
71
private
SchedulableRequestState
_state;
122
private Dictionary<
SchedulableRequestState
, ScheduleTimeRecord> _timeRecords;
140
_timeRecords = new Dictionary<
SchedulableRequestState
, ScheduleTimeRecord>(5);
141
_timeRecords[
SchedulableRequestState
.Unscheduled] = new ScheduleTimeRecord();
142
_timeRecords[
SchedulableRequestState
.Blocked] = new ScheduleTimeRecord();
143
_timeRecords[
SchedulableRequestState
.Yielding] = new ScheduleTimeRecord();
144
_timeRecords[
SchedulableRequestState
.Executing] = new ScheduleTimeRecord();
145
_timeRecords[
SchedulableRequestState
.Ready] = new ScheduleTimeRecord();
146
_timeRecords[
SchedulableRequestState
.Completed] = new ScheduleTimeRecord();
148
ChangeToState(
SchedulableRequestState
.Unscheduled);
154
public
SchedulableRequestState
State
190
VerifyOneOfStates([
SchedulableRequestState
.Yielding,
SchedulableRequestState
.Blocked,
SchedulableRequestState
.Executing]);
303
public TimeSpan GetTimeSpentInState(
SchedulableRequestState
desiredState)
313
VerifyState(
SchedulableRequestState
.Executing);
316
ChangeToState(
SchedulableRequestState
.Yielding);
324
VerifyState(
SchedulableRequestState
.Yielding);
326
ChangeToState(
SchedulableRequestState
.Ready);
337
VerifyOneOfStates([
SchedulableRequestState
.Blocked,
SchedulableRequestState
.Executing]);
353
blockingRequest.VerifyOneOfStates([
SchedulableRequestState
.Yielding,
SchedulableRequestState
.Blocked,
SchedulableRequestState
.Ready,
SchedulableRequestState
.Unscheduled]);
366
ChangeToState(
SchedulableRequestState
.Blocked);
374
VerifyOneOfStates([
SchedulableRequestState
.Blocked,
SchedulableRequestState
.Unscheduled]);
387
VerifyOneOfStates([
SchedulableRequestState
.Blocked,
SchedulableRequestState
.Unscheduled]);
403
VerifyOneOfStates([
SchedulableRequestState
.Ready,
SchedulableRequestState
.Unscheduled]);
404
ErrorUtilities.VerifyThrow((_state ==
SchedulableRequestState
.Ready) || !_schedulingData.IsRequestScheduled(this), "Another instance of request {0} is already scheduled.", _request.GlobalRequestId);
411
ChangeToState(
SchedulableRequestState
.Executing);
419
VerifyOneOfStates([
SchedulableRequestState
.Ready,
SchedulableRequestState
.Executing,
SchedulableRequestState
.Unscheduled]);
420
ErrorUtilities.VerifyThrow(_state !=
SchedulableRequestState
.Ready || result.CircularDependency, "Request can only be Completed from the Ready state if the result indicates a circular dependency occurred.");
430
ChangeToState(
SchedulableRequestState
.Completed);
438
VerifyState(
SchedulableRequestState
.Unscheduled);
441
ChangeToState(
SchedulableRequestState
.Completed);
447
public void VerifyState(
SchedulableRequestState
requiredState)
455
public void VerifyOneOfStates(
SchedulableRequestState
[] requiredStates)
457
foreach (
SchedulableRequestState
requiredState in requiredStates)
473
private void ChangeToState(
SchedulableRequestState
newState)
480
SchedulableRequestState
previousState = _state;
543
if (requestToEvaluate.State ==
SchedulableRequestState
.Unscheduled)
622
ChangeToState(
SchedulableRequestState
.Ready);
628
if (requestCausingFailure.State ==
SchedulableRequestState
.Unscheduled)
649
if (unblockingRequest.State ==
SchedulableRequestState
.Unscheduled)
656
ChangeToState(
SchedulableRequestState
.Ready);
BackEnd\Components\Scheduler\Scheduler.cs (10)
1361
request.VerifyState(
SchedulableRequestState
.Unscheduled);
1630
blockingRequest.VerifyOneOfStates([
SchedulableRequestState
.Yielding,
SchedulableRequestState
.Ready,
SchedulableRequestState
.Blocked]);
2369
case
SchedulableRequestState
.Executing:
2370
case
SchedulableRequestState
.Yielding:
2532
String.Format(CultureInfo.InvariantCulture, "{0:0.000}", request.GetTimeSpentInState(
SchedulableRequestState
.Executing).TotalSeconds),
2533
String.Format(CultureInfo.InvariantCulture, "{0:0.000}", request.GetTimeSpentInState(
SchedulableRequestState
.Executing).TotalSeconds + request.GetTimeSpentInState(
SchedulableRequestState
.Blocked).TotalSeconds + request.GetTimeSpentInState(
SchedulableRequestState
.Ready).TotalSeconds),
BackEnd\Components\Scheduler\SchedulingData.cs (26)
303
public void UpdateFromState(SchedulableRequest request,
SchedulableRequestState
previousState)
308
case
SchedulableRequestState
.Blocked:
312
case
SchedulableRequestState
.Yielding:
316
case
SchedulableRequestState
.Completed:
320
case
SchedulableRequestState
.Executing:
325
case
SchedulableRequestState
.Ready:
330
case
SchedulableRequestState
.Unscheduled:
335
if (request.State !=
SchedulableRequestState
.Completed)
368
case
SchedulableRequestState
.Blocked:
373
case
SchedulableRequestState
.Yielding:
378
case
SchedulableRequestState
.Completed:
390
case
SchedulableRequestState
.Executing:
397
if (previousState ==
SchedulableRequestState
.Unscheduled)
404
case
SchedulableRequestState
.Ready:
418
case
SchedulableRequestState
.Unscheduled:
453
ExpectScheduledRequestState(globalRequestId,
SchedulableRequestState
.Executing);
462
ExpectScheduledRequestState(globalRequestId,
SchedulableRequestState
.Blocked);
485
ExpectScheduledRequestState(globalRequestId,
SchedulableRequestState
.Yielding);
494
ExpectScheduledRequestState(globalRequestId,
SchedulableRequestState
.Ready);
735
private void ExpectScheduledRequestState(int globalRequestId,
SchedulableRequestState
state)
766
private
SchedulableRequestState
_oldState;
771
private
SchedulableRequestState
_newState;
776
public SchedulingEvent(DateTime eventTime, SchedulableRequest request,
SchedulableRequestState
oldState,
SchedulableRequestState
newState)
803
public
SchedulableRequestState
OldState
811
public
SchedulableRequestState
NewState
BackEnd\Components\Scheduler\SchedulingPlan.cs (1)
468
accumulatedTimeByConfiguration[request.BuildRequest.ConfigurationId] = accumulatedTime + request.GetTimeSpentInState(
SchedulableRequestState
.Executing).TotalMilliseconds;