Merge branch 'atp' of https://github.com/birarda/hifi into protocol

This commit is contained in:
Atlante45 2015-08-03 14:34:54 -07:00
commit 7bfc9f7fd1
2 changed files with 5 additions and 4 deletions

View file

@ -250,7 +250,7 @@ void SendQueue::run() {
// sleep as long as we need until next packet send, if we can
auto now = high_resolution_clock::now();
auto microsecondDuration = (_lastSendTimestamp + microseconds(_packetSendPeriod)) - now;
auto microsecondDuration = duration_cast<microseconds>((_lastSendTimestamp + microseconds(_packetSendPeriod)) - now);
if (microsecondDuration.count() > 0) {
usleep(microsecondDuration.count());

View file

@ -44,7 +44,7 @@ const QCommandLineOption UNRELIABLE_PACKETS {
const QStringList STATS_TABLE_HEADERS {
"Send Rate (P/s)", "RTT(ms)", "CW (P)", "Send Period (us)",
"Received ACK", "Processed ACK", "Received LACK", "Received NAK", "Received TNAK",
"Sent ACK2", "Re-sent Packets"
"Sent ACK2", "Sent Packets", "Re-sent Packets"
};
UDTTest::UDTTest(int& argc, char** argv) :
@ -123,8 +123,8 @@ UDTTest::UDTTest(int& argc, char** argv) :
if (!_target.isNull()) {
sendInitialPackets();
// the sender reports stats every 1 second
static const int STATS_SAMPLE_INTERVAL = 1000;
// the sender reports stats every 100ms
static const int STATS_SAMPLE_INTERVAL = 100;
QTimer* statsTimer = new QTimer(this);
connect(statsTimer, &QTimer::timeout, this, &UDTTest::sampleStats);
@ -234,6 +234,7 @@ void UDTTest::sampleStats() {
QString::number(stats.events[udt::ConnectionStats::Stats::ReceivedNAK]).leftJustified(STATS_TABLE_HEADERS[++headerIndex].size()),
QString::number(stats.events[udt::ConnectionStats::Stats::ReceivedTimeoutNAK]).leftJustified(STATS_TABLE_HEADERS[++headerIndex].size()),
QString::number(stats.events[udt::ConnectionStats::Stats::SentACK2]).leftJustified(STATS_TABLE_HEADERS[++headerIndex].size()),
QString::number(stats.sentPackets).leftJustified(STATS_TABLE_HEADERS[++headerIndex].size()),
QString::number(stats.events[udt::ConnectionStats::Stats::Retransmission]).leftJustified(STATS_TABLE_HEADERS[++headerIndex].size())
};