mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
cleanup RTT stats, add assert for CT
This commit is contained in:
parent
0e3403833d
commit
df1e97c591
2 changed files with 7 additions and 2 deletions
|
@ -120,6 +120,9 @@ void ControlPacket::readType() {
|
|||
|
||||
Q_ASSERT_X(bitAndType & CONTROL_BIT_MASK, "ControlPacket::readHeader()", "This should be a control packet");
|
||||
|
||||
uint16_t packetType = (bitAndType & ~CONTROL_BIT_MASK) >> (8 * sizeof(Type));
|
||||
Q_ASSERT_X(packetType < ControlPacket::Type::TimeoutNAK, "ControlPacket::readType()", "Received a control packet with wrong type");
|
||||
|
||||
// read the type
|
||||
_type = (Type) ((bitAndType & ~CONTROL_BIT_MASK) >> (8 * sizeof(Type)));
|
||||
_type = (Type) packetType;
|
||||
}
|
||||
|
|
|
@ -218,10 +218,12 @@ void UDTTest::sampleStats() {
|
|||
|
||||
int headerIndex = -1;
|
||||
|
||||
static const double USECS_PER_MSEC = 1000.0;
|
||||
|
||||
// setup a list of left justified values
|
||||
QStringList values {
|
||||
QString::number(stats.receiveRate).leftJustified(STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||
QString::number(stats.rtt).leftJustified(STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||
QString::number(stats.rtt / USECS_PER_MSEC).leftJustified(STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||
QString::number(stats.congestionWindowSize).leftJustified(STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||
QString::number(stats.packetSendPeriod).leftJustified(STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||
QString::number(stats.receivedACKs).leftJustified(STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||
|
|
Loading…
Reference in a new issue