mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-29 20:52:16 +02:00
some header cleanup in UDTTest output
This commit is contained in:
parent
92116dd6e7
commit
9ff7bfd0b5
3 changed files with 45 additions and 45 deletions
|
@ -48,14 +48,14 @@ void ConnectionStats::recordSentPackets(int payload, int total) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConnectionStats::recordReceivedPackets(int payload, int total) {
|
void ConnectionStats::recordReceivedPackets(int payload, int total) {
|
||||||
++_currentSample.recievedPackets;
|
++_currentSample.receivedPackets;
|
||||||
++_total.recievedPackets;
|
++_total.receivedPackets;
|
||||||
|
|
||||||
_currentSample.recievedUtilBytes += payload;
|
_currentSample.receivedUtilBytes += payload;
|
||||||
_total.recievedUtilBytes += payload;
|
_total.receivedUtilBytes += payload;
|
||||||
|
|
||||||
_currentSample.recievedBytes += total;
|
_currentSample.receivedBytes += total;
|
||||||
_total.recievedBytes += total;
|
_total.receivedBytes += total;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConnectionStats::recordUnreliableSentPackets(int payload, int total) {
|
void ConnectionStats::recordUnreliableSentPackets(int payload, int total) {
|
||||||
|
@ -70,14 +70,14 @@ void ConnectionStats::recordUnreliableSentPackets(int payload, int total) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConnectionStats::recordUnreliableReceivedPackets(int payload, int total) {
|
void ConnectionStats::recordUnreliableReceivedPackets(int payload, int total) {
|
||||||
++_currentSample.recievedUnreliablePackets;
|
++_currentSample.receivedUnreliablePackets;
|
||||||
++_total.recievedUnreliablePackets;
|
++_total.receivedUnreliablePackets;
|
||||||
|
|
||||||
_currentSample.recievedUnreliableUtilBytes += payload;
|
_currentSample.receivedUnreliableUtilBytes += payload;
|
||||||
_total.recievedUnreliableUtilBytes += payload;
|
_total.receivedUnreliableUtilBytes += payload;
|
||||||
|
|
||||||
_currentSample.sentUnreliableBytes += total;
|
_currentSample.sentUnreliableBytes += total;
|
||||||
_total.recievedUnreliableBytes += total;
|
_total.receivedUnreliableBytes += total;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const double EWMA_CURRENT_SAMPLE_WEIGHT = 0.125;
|
static const double EWMA_CURRENT_SAMPLE_WEIGHT = 0.125;
|
||||||
|
|
|
@ -44,18 +44,18 @@ public:
|
||||||
|
|
||||||
// packet counts and sizes
|
// packet counts and sizes
|
||||||
int sentPackets { 0 };
|
int sentPackets { 0 };
|
||||||
int recievedPackets { 0 };
|
int receivedPackets { 0 };
|
||||||
int sentUtilBytes { 0 };
|
int sentUtilBytes { 0 };
|
||||||
int recievedUtilBytes { 0 };
|
int receivedUtilBytes { 0 };
|
||||||
int sentBytes { 0 };
|
int sentBytes { 0 };
|
||||||
int recievedBytes { 0 };
|
int receivedBytes { 0 };
|
||||||
|
|
||||||
int sentUnreliablePackets { 0 };
|
int sentUnreliablePackets { 0 };
|
||||||
int recievedUnreliablePackets { 0 };
|
int receivedUnreliablePackets { 0 };
|
||||||
int sentUnreliableUtilBytes { 0 };
|
int sentUnreliableUtilBytes { 0 };
|
||||||
int recievedUnreliableUtilBytes { 0 };
|
int receivedUnreliableUtilBytes { 0 };
|
||||||
int sentUnreliableBytes { 0 };
|
int sentUnreliableBytes { 0 };
|
||||||
int recievedUnreliableBytes { 0 };
|
int receivedUnreliableBytes { 0 };
|
||||||
|
|
||||||
// the following stats are trailing averages in the result, not totals
|
// the following stats are trailing averages in the result, not totals
|
||||||
int sendRate { 0 };
|
int sendRate { 0 };
|
||||||
|
|
|
@ -57,15 +57,15 @@ const QCommandLineOption STATS_INTERVAL {
|
||||||
};
|
};
|
||||||
|
|
||||||
const QStringList CLIENT_STATS_TABLE_HEADERS {
|
const QStringList CLIENT_STATS_TABLE_HEADERS {
|
||||||
"Send Rate (P/s)", "Bandwidth (P/s)", "RTT(ms)", "CW (P)", "Send Period (us)",
|
"Send (P/s)", "Est. Max (P/s)", "RTT (ms)", "CW (P)", "Period (us)",
|
||||||
"Received ACK", "Processed ACK", "Received LACK", "Received NAK", "Received TNAK",
|
"Recv ACK", "Procd ACK", "Recv LACK", "Recv NAK", "Recv TNAK",
|
||||||
"Sent ACK2", "Sent Packets", "Re-sent Packets"
|
"Sent ACK2", "Sent Packets", "Re-sent Packets"
|
||||||
};
|
};
|
||||||
|
|
||||||
const QStringList SERVER_STATS_TABLE_HEADERS {
|
const QStringList SERVER_STATS_TABLE_HEADERS {
|
||||||
"Received Megabits", "Receive Rate (P/s)", "Bandwidth (P/s)", "RTT(ms)", "CW (P)",
|
"Megabits", "Recv P/s", "Est. Max (P/s)", "RTT (ms)", "CW (P)",
|
||||||
"Sent ACK", "Sent LACK", "Sent NAK", "Sent TNAK",
|
"Sent ACK", "Sent LACK", "Sent NAK", "Sent TNAK",
|
||||||
"Recieved ACK2", "Duplicate Packets"
|
"Recv ACK2", "Duplicates (P)"
|
||||||
};
|
};
|
||||||
|
|
||||||
UDTTest::UDTTest(int& argc, char** argv) :
|
UDTTest::UDTTest(int& argc, char** argv) :
|
||||||
|
@ -356,19 +356,19 @@ void UDTTest::sampleStats() {
|
||||||
|
|
||||||
// setup a list of left justified values
|
// setup a list of left justified values
|
||||||
QStringList values {
|
QStringList values {
|
||||||
QString::number(stats.sendRate).leftJustified(CLIENT_STATS_TABLE_HEADERS[++headerIndex].size()),
|
QString::number(stats.sendRate).rightJustified(CLIENT_STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||||
QString::number(stats.estimatedBandwith).leftJustified(CLIENT_STATS_TABLE_HEADERS[++headerIndex].size()),
|
QString::number(stats.estimatedBandwith).rightJustified(CLIENT_STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||||
QString::number(stats.rtt / USECS_PER_MSEC).leftJustified(CLIENT_STATS_TABLE_HEADERS[++headerIndex].size()),
|
QString::number(stats.rtt / USECS_PER_MSEC, 'f', 2).rightJustified(CLIENT_STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||||
QString::number(stats.congestionWindowSize).leftJustified(CLIENT_STATS_TABLE_HEADERS[++headerIndex].size()),
|
QString::number(stats.congestionWindowSize).rightJustified(CLIENT_STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||||
QString::number(stats.packetSendPeriod).leftJustified(CLIENT_STATS_TABLE_HEADERS[++headerIndex].size()),
|
QString::number(stats.packetSendPeriod).rightJustified(CLIENT_STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||||
QString::number(stats.events[udt::ConnectionStats::Stats::ReceivedACK]).leftJustified(CLIENT_STATS_TABLE_HEADERS[++headerIndex].size()),
|
QString::number(stats.events[udt::ConnectionStats::Stats::ReceivedACK]).rightJustified(CLIENT_STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||||
QString::number(stats.events[udt::ConnectionStats::Stats::ProcessedACK]).leftJustified(CLIENT_STATS_TABLE_HEADERS[++headerIndex].size()),
|
QString::number(stats.events[udt::ConnectionStats::Stats::ProcessedACK]).rightJustified(CLIENT_STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||||
QString::number(stats.events[udt::ConnectionStats::Stats::ReceivedLightACK]).leftJustified(CLIENT_STATS_TABLE_HEADERS[++headerIndex].size()),
|
QString::number(stats.events[udt::ConnectionStats::Stats::ReceivedLightACK]).rightJustified(CLIENT_STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||||
QString::number(stats.events[udt::ConnectionStats::Stats::ReceivedNAK]).leftJustified(CLIENT_STATS_TABLE_HEADERS[++headerIndex].size()),
|
QString::number(stats.events[udt::ConnectionStats::Stats::ReceivedNAK]).rightJustified(CLIENT_STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||||
QString::number(stats.events[udt::ConnectionStats::Stats::ReceivedTimeoutNAK]).leftJustified(CLIENT_STATS_TABLE_HEADERS[++headerIndex].size()),
|
QString::number(stats.events[udt::ConnectionStats::Stats::ReceivedTimeoutNAK]).rightJustified(CLIENT_STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||||
QString::number(stats.events[udt::ConnectionStats::Stats::SentACK2]).leftJustified(CLIENT_STATS_TABLE_HEADERS[++headerIndex].size()),
|
QString::number(stats.events[udt::ConnectionStats::Stats::SentACK2]).rightJustified(CLIENT_STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||||
QString::number(stats.sentPackets).leftJustified(CLIENT_STATS_TABLE_HEADERS[++headerIndex].size()),
|
QString::number(stats.sentPackets).rightJustified(CLIENT_STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||||
QString::number(stats.events[udt::ConnectionStats::Stats::Retransmission]).leftJustified(CLIENT_STATS_TABLE_HEADERS[++headerIndex].size())
|
QString::number(stats.events[udt::ConnectionStats::Stats::Retransmission]).rightJustified(CLIENT_STATS_TABLE_HEADERS[++headerIndex].size())
|
||||||
};
|
};
|
||||||
|
|
||||||
// output this line of values
|
// output this line of values
|
||||||
|
@ -390,17 +390,17 @@ void UDTTest::sampleStats() {
|
||||||
|
|
||||||
// setup a list of left justified values
|
// setup a list of left justified values
|
||||||
QStringList values {
|
QStringList values {
|
||||||
QString::number(stats.recievedBytes * MEGABITS_PER_BYTE).leftJustified(SERVER_STATS_TABLE_HEADERS[++headerIndex].size()),
|
QString::number(stats.receivedBytes * MEGABITS_PER_BYTE, 'f', 2).rightJustified(SERVER_STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||||
QString::number(stats.receiveRate).leftJustified(SERVER_STATS_TABLE_HEADERS[++headerIndex].size()),
|
QString::number(stats.receiveRate).rightJustified(SERVER_STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||||
QString::number(stats.estimatedBandwith).leftJustified(SERVER_STATS_TABLE_HEADERS[++headerIndex].size()),
|
QString::number(stats.estimatedBandwith).rightJustified(SERVER_STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||||
QString::number(stats.rtt / USECS_PER_MSEC).leftJustified(SERVER_STATS_TABLE_HEADERS[++headerIndex].size()),
|
QString::number(stats.rtt / USECS_PER_MSEC, 'f', 2).rightJustified(SERVER_STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||||
QString::number(stats.congestionWindowSize).leftJustified(CLIENT_STATS_TABLE_HEADERS[++headerIndex].size()),
|
QString::number(stats.congestionWindowSize).rightJustified(SERVER_STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||||
QString::number(stats.events[udt::ConnectionStats::Stats::SentACK]).leftJustified(SERVER_STATS_TABLE_HEADERS[++headerIndex].size()),
|
QString::number(stats.events[udt::ConnectionStats::Stats::SentACK]).rightJustified(SERVER_STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||||
QString::number(stats.events[udt::ConnectionStats::Stats::SentLightACK]).leftJustified(SERVER_STATS_TABLE_HEADERS[++headerIndex].size()),
|
QString::number(stats.events[udt::ConnectionStats::Stats::SentLightACK]).rightJustified(SERVER_STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||||
QString::number(stats.events[udt::ConnectionStats::Stats::SentNAK]).leftJustified(SERVER_STATS_TABLE_HEADERS[++headerIndex].size()),
|
QString::number(stats.events[udt::ConnectionStats::Stats::SentNAK]).rightJustified(SERVER_STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||||
QString::number(stats.events[udt::ConnectionStats::Stats::SentTimeoutNAK]).leftJustified(SERVER_STATS_TABLE_HEADERS[++headerIndex].size()),
|
QString::number(stats.events[udt::ConnectionStats::Stats::SentTimeoutNAK]).rightJustified(SERVER_STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||||
QString::number(stats.events[udt::ConnectionStats::Stats::ReceivedACK2]).leftJustified(SERVER_STATS_TABLE_HEADERS[++headerIndex].size()),
|
QString::number(stats.events[udt::ConnectionStats::Stats::ReceivedACK2]).rightJustified(SERVER_STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||||
QString::number(stats.events[udt::ConnectionStats::Stats::Duplicate]).leftJustified(SERVER_STATS_TABLE_HEADERS[++headerIndex].size())
|
QString::number(stats.events[udt::ConnectionStats::Stats::Duplicate]).rightJustified(SERVER_STATS_TABLE_HEADERS[++headerIndex].size())
|
||||||
};
|
};
|
||||||
|
|
||||||
// output this line of values
|
// output this line of values
|
||||||
|
|
Loading…
Reference in a new issue