Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show a rolling average in Connection Information dialog #5872

Open
piegamesde opened this issue Sep 9, 2022 · 2 comments · May be fixed by #6683
Open

Show a rolling average in Connection Information dialog #5872

piegamesde opened this issue Sep 9, 2022 · 2 comments · May be fixed by #6683
Labels
client feature-request This issue or PR deals with a new feature good first issue Good for first-time contributors ui

Comments

@piegamesde
Copy link

Context

When somebody has packet loss

Description

The connection information dialog is only mildly useful IME. Especially the network statistics are pretty much useless if they only show the average over the entire X hours of connected time. A rolling average would be way more useful. I'd suggest averaging over the last 60 seconds and 15 minutes, respectively.

Mumble component

Client

OS-specific?

No

Additional information

Have a look at what TeamSpeak does as a reference

@piegamesde piegamesde added feature-request This issue or PR deals with a new feature triage This issue is waiting to be triaged by one of the project members labels Sep 9, 2022
@Krzmbrzl Krzmbrzl added client good first issue Good for first-time contributors ui and removed triage This issue is waiting to be triaged by one of the project members labels Sep 10, 2022
@kptil
Copy link

kptil commented Sep 15, 2022

I'd like to work on this issue as my first contribution. I hope to submit a PR within a week.

@Krzmbrzl
Copy link
Member

@kptil great to hear that! 👍
If you need any help, please let me know :)

In case you haven't found it already: Here's where the connection information (the UDP part of it) is populated:

qgbUDP->setVisible(true);
const MumbleProto::UserStats_Stats &from = msg.from_client();
qlFromGood->setText(QString::number(from.good()));
qlFromLate->setText(QString::number(from.late()));
qlFromLost->setText(QString::number(from.lost()));
qlFromResync->setText(QString::number(from.resync()));
const MumbleProto::UserStats_Stats &to = msg.from_server();
qlToGood->setText(QString::number(to.good()));
qlToLate->setText(QString::number(to.late()));
qlToLost->setText(QString::number(to.lost()));
qlToResync->setText(QString::number(to.resync()));
quint32 allFromPackets = from.good() + from.late() + from.lost();
qlFromLatePercent->setText(
QString::number(allFromPackets > 0 ? from.late() * 100.0 / allFromPackets : 0., 'f', 2));
qlFromLostPercent->setText(
QString::number(allFromPackets > 0 ? from.lost() * 100.0 / allFromPackets : 0., 'f', 2));
quint32 allToPackets = to.good() + to.late() + to.lost();
qlToLatePercent->setText(QString::number(allToPackets > 0 ? to.late() * 100.0 / allToPackets : 0., 'f', 2));
qlToLostPercent->setText(QString::number(allToPackets > 0 ? to.lost() * 100.0 / allToPackets : 0., 'f', 2));

And this is where on the server the respective message is prepared and sent (I don't think that this is really relevant though):

mumble/src/murmur/Messages.cpp

Lines 2198 to 2262 in 7b73c62

msg.set_session(pDstServerUser->uiSession);
if (details) {
foreach (const QSslCertificate &cert, certs) {
const QByteArray &der = cert.toDer();
msg.add_certificates(blob(der));
}
msg.set_strong_certificate(pDstServerUser->bVerified);
}
if (local) {
MumbleProto::UserStats_Stats *mpusss;
QMutexLocker l(&pDstServerUser->qmCrypt);
mpusss = msg.mutable_from_client();
mpusss->set_good(pDstServerUser->csCrypt->uiGood);
mpusss->set_late(pDstServerUser->csCrypt->uiLate);
mpusss->set_lost(pDstServerUser->csCrypt->uiLost);
mpusss->set_resync(pDstServerUser->csCrypt->uiResync);
mpusss = msg.mutable_from_server();
mpusss->set_good(pDstServerUser->csCrypt->uiRemoteGood);
mpusss->set_late(pDstServerUser->csCrypt->uiRemoteLate);
mpusss->set_lost(pDstServerUser->csCrypt->uiRemoteLost);
mpusss->set_resync(pDstServerUser->csCrypt->uiRemoteResync);
}
msg.set_udp_packets(pDstServerUser->uiUDPPackets);
msg.set_tcp_packets(pDstServerUser->uiTCPPackets);
msg.set_udp_ping_avg(pDstServerUser->dUDPPingAvg);
msg.set_udp_ping_var(pDstServerUser->dUDPPingVar);
msg.set_tcp_ping_avg(pDstServerUser->dTCPPingAvg);
msg.set_tcp_ping_var(pDstServerUser->dTCPPingVar);
if (details) {
MumbleProto::Version *mpv;
mpv = msg.mutable_version();
if (pDstServerUser->m_version != Version::UNKNOWN) {
MumbleProto::setVersion(*mpv, pDstServerUser->m_version);
}
if (!pDstServerUser->qsRelease.isEmpty()) {
mpv->set_release(u8(pDstServerUser->qsRelease));
}
if (!pDstServerUser->qsOS.isEmpty()) {
mpv->set_os(u8(pDstServerUser->qsOS));
if (!pDstServerUser->qsOSVersion.isEmpty())
mpv->set_os_version(u8(pDstServerUser->qsOSVersion));
}
foreach (int v, pDstServerUser->qlCodecs)
msg.add_celt_versions(v);
msg.set_opus(pDstServerUser->bOpus);
msg.set_address(pDstServerUser->haAddress.toStdString());
}
if (local)
msg.set_bandwidth(bwr.bandwidth());
msg.set_onlinesecs(bwr.onlineSeconds());
if (local)
msg.set_idlesecs(bwr.idleSeconds());
sendMessage(uSource, msg);

@Hartmnt Hartmnt linked a pull request Jan 6, 2025 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client feature-request This issue or PR deals with a new feature good first issue Good for first-time contributors ui
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants