mirror of
https://github.com/lubosz/overte.git
synced 2025-04-09 00:02:39 +02:00
Stats improvement
This commit is contained in:
parent
99fcb08fd1
commit
40520c204f
3 changed files with 8 additions and 4 deletions
|
@ -508,6 +508,8 @@ void Connection::processACK2(std::unique_ptr<ControlPacket> controlPacket) {
|
|||
int rtt = duration_cast<microseconds>(now - it->second.second).count();
|
||||
|
||||
updateRTT(rtt);
|
||||
// write this RTT to stats
|
||||
_stats.recordRTT(rtt);
|
||||
|
||||
// set the RTT for congestion control
|
||||
_congestionControl->setRTT(_rtt);
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
using namespace udt;
|
||||
using namespace std::chrono;
|
||||
|
||||
static const int DEFAULT_PACKET_INTERVAL_MICROSECONDS = 1000000;
|
||||
static const int DEFAULT_PROBE_INTERVAL_MICROSECONDS = 1000;
|
||||
static const int DEFAULT_PACKET_INTERVAL_MICROSECONDS = 1000000; // 1s
|
||||
static const int DEFAULT_PROBE_INTERVAL_MICROSECONDS = 1000; // 1ms
|
||||
|
||||
PacketTimeWindow::PacketTimeWindow(int numPacketIntervals, int numProbeIntervals) :
|
||||
_numPacketIntervals(numPacketIntervals),
|
||||
|
|
|
@ -220,6 +220,7 @@ void UDTTest::sendPacket() {
|
|||
|
||||
void UDTTest::sampleStats() {
|
||||
static bool first = true;
|
||||
static const double USECS_PER_MSEC = 1000.0;
|
||||
|
||||
if (!_target.isNull()) {
|
||||
if (first) {
|
||||
|
@ -232,8 +233,6 @@ 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.sendRate).leftJustified(CLIENT_STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||
|
@ -269,6 +268,9 @@ void UDTTest::sampleStats() {
|
|||
// setup a list of left justified values
|
||||
QStringList values {
|
||||
QString::number(stats.receiveRate).leftJustified(SERVER_STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||
QString::number(stats.estimatedBandwith).leftJustified(SERVER_STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||
QString::number(stats.rtt / USECS_PER_MSEC).leftJustified(SERVER_STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||
QString::number(stats.congestionWindowSize).leftJustified(CLIENT_STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||
QString::number(stats.recievedBytes).leftJustified(SERVER_STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||
QString::number(stats.recievedUtilBytes).leftJustified(SERVER_STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||
QString::number(100 * (double)stats.recievedUtilBytes / (double)stats.recievedBytes).leftJustified(SERVER_STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||
|
|
Loading…
Reference in a new issue