Comment out the debugging statements added in the last commit. Keeping
them in the code for later use rather than just reverting them. Fixed the throttle tests for the new algorithm used when packets are marked as expired.mb-throttle-test
parent
58229a968b
commit
5bb73793c7
|
@ -186,8 +186,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
|
||||||
udpServer.Throttle.DebugLevel = 1;
|
udpServer.Throttle.DebugLevel = 1;
|
||||||
udpClient.ThrottleDebugLevel = 1;
|
udpClient.ThrottleDebugLevel = 1;
|
||||||
|
|
||||||
// Total is 280000
|
// Total is 275000
|
||||||
int resendBytes = 10000;
|
int resendBytes = 5000; // this is set low to test the minimum throttle override
|
||||||
int landBytes = 20000;
|
int landBytes = 20000;
|
||||||
int windBytes = 30000;
|
int windBytes = 30000;
|
||||||
int cloudBytes = 40000;
|
int cloudBytes = 40000;
|
||||||
|
@ -214,13 +214,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
|
||||||
|
|
||||||
AssertThrottles(
|
AssertThrottles(
|
||||||
udpClient,
|
udpClient,
|
||||||
resendBytes * commitRatio, landBytes * commitRatio, windBytes * commitRatio, cloudBytes * commitRatio, taskBytes * commitRatio,
|
LLUDPServer.MTU, landBytes * commitRatio, windBytes * commitRatio, cloudBytes * commitRatio, taskBytes * commitRatio,
|
||||||
textureBytes * commitRatio, assetBytes * commitRatio, udpClient.FlowThrottle.AdjustedDripRate, totalBytes, 0);
|
textureBytes * commitRatio, assetBytes * commitRatio, udpClient.FlowThrottle.AdjustedDripRate, totalBytes, 0);
|
||||||
|
|
||||||
// Test a decrease in target throttle, adaptive throttle should cut the rate by 50% with a floor
|
// Test a decrease in target throttle, adaptive throttle should cut the rate by 50% with a floor
|
||||||
// set by the minimum adaptive rate
|
// set by the minimum adaptive rate
|
||||||
udpClient.FlowThrottle.ExpirePackets(1);
|
udpClient.FlowThrottle.ExpirePackets(1);
|
||||||
commitRatio = Math.Max((32000.0 + 20.0 * LLUDPServer.MTU)/Math.Pow(2,1), 32000.0) / totalBytes;
|
commitRatio = (32000.0 + (20.0 * LLUDPServer.MTU)/Math.Pow(2,1)) / totalBytes;
|
||||||
|
|
||||||
AssertThrottles(
|
AssertThrottles(
|
||||||
udpClient,
|
udpClient,
|
||||||
|
|
|
@ -31,8 +31,8 @@ using System.Net;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
|
|
||||||
using System.Reflection;
|
//using System.Reflection;
|
||||||
using log4net;
|
//using log4net;
|
||||||
|
|
||||||
namespace OpenSim.Region.ClientStack.LindenUDP
|
namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
|
@ -63,7 +63,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
/// <summary>Holds the actual unacked packet data, sorted by sequence number</summary>
|
/// <summary>Holds the actual unacked packet data, sorted by sequence number</summary>
|
||||||
private Dictionary<uint, OutgoingPacket> m_packets = new Dictionary<uint, OutgoingPacket>();
|
private Dictionary<uint, OutgoingPacket> m_packets = new Dictionary<uint, OutgoingPacket>();
|
||||||
|
@ -169,8 +169,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (expiredPackets != null)
|
// if (expiredPackets != null)
|
||||||
// m_log.DebugFormat("[UNACKED PACKET COLLECTION]: Found {0} expired packets on timeout of {1}", expiredPackets.Count, timeoutMS);
|
// m_log.DebugFormat("[UNACKED PACKET COLLECTION]: Found {0} expired packets on timeout of {1}", expiredPackets.Count, timeoutMS);
|
||||||
|
|
||||||
return expiredPackets;
|
return expiredPackets;
|
||||||
}
|
}
|
||||||
|
@ -212,14 +212,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.WarnFormat("[UNACKED PACKET COLLECTION]: found null packet for sequence number {0} to ack",
|
// m_log.WarnFormat("[UNACKED PACKET COLLECTION]: found null packet for sequence number {0} to ack",
|
||||||
pendingAcknowledgement.SequenceNumber);
|
// pendingAcknowledgement.SequenceNumber);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.WarnFormat("[UNACKED PACKET COLLECTION]: Could not find packet with sequence number {0} to ack",
|
// m_log.WarnFormat("[UNACKED PACKET COLLECTION]: Could not find packet with sequence number {0} to ack",
|
||||||
pendingAcknowledgement.SequenceNumber);
|
// pendingAcknowledgement.SequenceNumber);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue