fix : 포매팅, dead 코드 제거, 패킷 1번 수정

This commit is contained in:
qornwh1
2026-03-04 10:50:42 +09:00
parent 4ef58c2fad
commit 8f49d3a5b4
5 changed files with 23 additions and 73 deletions

View File

@@ -100,12 +100,9 @@ public class DummyClientService
{
int totalSent = 0, totalRecv = 0;
int connected = 0;
int rttClientCount = 0;
Log.Information("───────────── Performance Report ─────────────");
double totalAvgRtt = 0;
foreach (DummyClients c in clients)
{
NetStatistics? stats = c.peer?.Statistics;
@@ -113,16 +110,11 @@ public class DummyClientService
float lossPct = stats?.PacketLossPercent ?? 0f;
Log.Information(
"[Client {ClientId:00}] Sent={Sent} Recv={Recv} | Loss={Loss}({LossPct:F1}%) AvgRTT={AvgRtt:F3}ms LastRTT={LastRtt:F3}ms",
c.clientId, c.SentCount, c.ReceivedCount, loss, lossPct, c.AvgRttMs, c.LastRttMs);
"[Client {ClientId:00}] Sent={Sent} Recv={Recv} | Loss={Loss}({LossPct:F1}%)",
c.clientId, c.SentCount, c.ReceivedCount, loss, lossPct);
totalSent += c.SentCount;
totalRecv += c.ReceivedCount;
if (c.RttCount > 0)
{
totalAvgRtt += c.AvgRttMs;
rttClientCount++;
}
if (c.peer != null)
{
@@ -130,12 +122,10 @@ public class DummyClientService
}
}
double avgRtt = rttClientCount > 0 ? totalAvgRtt / rttClientCount : 0;
Log.Information("────────────────────────────────────────────");
Log.Information(
"[TOTAL] Sent={Sent} Recv={Recv} Connected={Connected}/{Total} AvgRTT={AvgRtt:F3}ms",
totalSent, totalRecv, connected, clients.Count, avgRtt);
"[TOTAL] Sent={Sent} Recv={Recv} Connected={Connected}/{Total}",
totalSent, totalRecv, connected, clients.Count);
Log.Information("────────────────────────────────────────────");
}