Skip to content

Commit

Permalink
More diagnostic output
Browse files Browse the repository at this point in the history
  • Loading branch information
ladipro committed Sep 25, 2023
1 parent 14c0f6f commit b1a78bc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Build.UnitTests/BackEnd/BuildManager_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4053,8 +4053,10 @@ public void IdenticalSubmissionsShouldCompleteAndNotHangTheBuildOnMissingTargetE
$@"<Project InitialTargets=`Sleep`>
<Target Name=`Sleep`>
<Message Text='### Before sleep command' Importance='High' />
<!-- Add a sleep to give the Scheduler time to register both submissions -->
<Exec Command='{Helpers.GetSleepCommand(TimeSpan.FromSeconds(1))}' />
<Message Text='### After sleep command' Importance='High' />
</Target>
<!-- The nonexistent target will force the TargetBuilder to not include a result for the Build target,
Expand Down
2 changes: 2 additions & 0 deletions src/Build/BackEnd/BuildManager/BuildManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2679,11 +2679,13 @@ private void PerformSchedulingActions(IEnumerable<ScheduleResponse> responses)
if (!_nodeIdToKnownConfigurations.TryGetValue(response.NodeId, out HashSet<NGen<int>> configurationsOnNode) ||
!configurationsOnNode.Contains(response.BuildRequest.ConfigurationId))
{
Console.WriteLine("PerformSchedulingActions -> get config cache");
IConfigCache configCache = _componentFactories.GetComponent(BuildComponentType.ConfigCache) as IConfigCache;
_nodeManager.SendData(response.NodeId, configCache[response.BuildRequest.ConfigurationId]);
}
}

Console.WriteLine("PerformSchedulingActions -> SendData(BuildRequest)");
_nodeManager.SendData(response.NodeId, response.BuildRequest);
break;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,12 @@ public void SendData(INodePacket packet)

if (_mode == EndpointMode.Synchronous)
{
Console.WriteLine("NodeEndpointInProc.SendData(synchronous)");
_peerEndpoint._packetFactory.RoutePacket(0, packet);
}
else
{
Console.WriteLine("NodeEndpointInProc.SendData(async)");
EnqueuePacket(packet);
}
}
Expand Down Expand Up @@ -436,6 +438,7 @@ private void PacketPumpProc()
INodePacket packet;
while (_packetQueue.TryDequeue(out packet))
{
Console.WriteLine("NodeEndpointInProc.PacketPumpProc -> RoutePacket");
_peerEndpoint._packetFactory.RoutePacket(0, packet);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,13 @@ public void SendData(int nodeId, INodePacket packet)
ErrorUtilities.VerifyThrowArgumentOutOfRange(nodeId == _inProcNodeId, "node");
ErrorUtilities.VerifyThrowArgumentNull(packet, nameof(packet));

Console.WriteLine("NodeProviderInProc.SendData");
if (_inProcNode == null)
{
return;
}

Console.WriteLine("NodeProviderInProc.SendData -> SendData");
_inProcNodeEndpoint.SendData(packet);
}

Expand Down

0 comments on commit b1a78bc

Please sign in to comment.