mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-29 06:02:07 +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();
|
int rtt = duration_cast<microseconds>(now - it->second.second).count();
|
||||||
|
|
||||||
updateRTT(rtt);
|
updateRTT(rtt);
|
||||||
|
// write this RTT to stats
|
||||||
|
_stats.recordRTT(rtt);
|
||||||
|
|
||||||
// set the RTT for congestion control
|
// set the RTT for congestion control
|
||||||
_congestionControl->setRTT(_rtt);
|
_congestionControl->setRTT(_rtt);
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
using namespace udt;
|
using namespace udt;
|
||||||
using namespace std::chrono;
|
using namespace std::chrono;
|
||||||
|
|
||||||
static const int DEFAULT_PACKET_INTERVAL_MICROSECONDS = 1000000;
|
static const int DEFAULT_PACKET_INTERVAL_MICROSECONDS = 1000000; // 1s
|
||||||
static const int DEFAULT_PROBE_INTERVAL_MICROSECONDS = 1000;
|
static const int DEFAULT_PROBE_INTERVAL_MICROSECONDS = 1000; // 1ms
|
||||||
|
|
||||||
PacketTimeWindow::PacketTimeWindow(int numPacketIntervals, int numProbeIntervals) :
|
PacketTimeWindow::PacketTimeWindow(int numPacketIntervals, int numProbeIntervals) :
|
||||||
_numPacketIntervals(numPacketIntervals),
|
_numPacketIntervals(numPacketIntervals),
|
||||||
|
|
|
@ -220,6 +220,7 @@ void UDTTest::sendPacket() {
|
||||||
|
|
||||||
void UDTTest::sampleStats() {
|
void UDTTest::sampleStats() {
|
||||||
static bool first = true;
|
static bool first = true;
|
||||||
|
static const double USECS_PER_MSEC = 1000.0;
|
||||||
|
|
||||||
if (!_target.isNull()) {
|
if (!_target.isNull()) {
|
||||||
if (first) {
|
if (first) {
|
||||||
|
@ -232,8 +233,6 @@ void UDTTest::sampleStats() {
|
||||||
|
|
||||||
int headerIndex = -1;
|
int headerIndex = -1;
|
||||||
|
|
||||||
static const double USECS_PER_MSEC = 1000.0;
|
|
||||||
|
|
||||||
// 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).leftJustified(CLIENT_STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||||
|
@ -269,6 +268,9 @@ void UDTTest::sampleStats() {
|
||||||
// setup a list of left justified values
|
// setup a list of left justified values
|
||||||
QStringList values {
|
QStringList values {
|
||||||
QString::number(stats.receiveRate).leftJustified(SERVER_STATS_TABLE_HEADERS[++headerIndex].size()),
|
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.recievedBytes).leftJustified(SERVER_STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||||
QString::number(stats.recievedUtilBytes).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()),
|
QString::number(100 * (double)stats.recievedUtilBytes / (double)stats.recievedBytes).leftJustified(SERVER_STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||||
|
|
Loading…
Reference in a new issue