fix : 포매팅, dead 코드 제거, 패킷 1번 수정
This commit is contained in:
@@ -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("────────────────────────────────────────────");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user