private TcpStats AnalyzeConnections(ConnectionData[] connections, TimeSpan measurePeriod) { _receivedSinceLastRun = 0; _sentSinceLastRun = 0; _pendingSendOnLastRun = 0; _inSendOnLastRun = 0; _pendingReceivedOnLastRun = 0; _anySendBlockedOnLastRun = false; foreach (var connection in connections) { AnalyzeConnection(connection); } var stats = new TcpStats(connections.Length, _sentTotal, _receivedTotal, _sentSinceLastRun, _receivedSinceLastRun, _pendingSendOnLastRun, _inSendOnLastRun, _pendingReceivedOnLastRun, measurePeriod); return(stats); }
private TcpStats AnalyzeConnections(ConnectionData[] connections, TimeSpan measurePeriod) { _receivedSinceLastRun = 0; _sentSinceLastRun = 0; _pendingSendOnLastRun = 0; _inSendOnLastRun = 0; _pendingReceivedOnLastRun = 0; _anySendBlockedOnLastRun = false; foreach (var connection in connections) { AnalyzeConnection(connection); } var stats = new TcpStats(connections.Length, _sentTotal, _receivedTotal, _sentSinceLastRun, _receivedSinceLastRun, _pendingSendOnLastRun, _inSendOnLastRun, _pendingReceivedOnLastRun, measurePeriod); if (Application.IsDefined(Application.DumpStatistics)) { Log.Trace( "\n# Total connections: {connections,3}. Out: {sendingSpeed:0.00}b/s In: {receivingSpeed:0.00}b/s Pending Send: {pendingSend} " + "In Send: {inSend} Pending Received: {pendingReceived} Measure Time: {measureTime}", stats.Connections, stats.SendingSpeed, stats.ReceivingSpeed, stats.PendingSend, stats.InSend, stats.PendingReceived, stats.MeasureTime); } return(stats); }
private TcpStats AnalyzeConnections(ConnectionData[] connections, TimeSpan measurePeriod) { _receivedSinceLastRun = 0; _sentSinceLastRun = 0; _pendingSendOnLastRun = 0; _inSendOnLastRun = 0; _pendingReceivedOnLastRun = 0; _anySendBlockedOnLastRun = false; foreach (var connection in connections) { AnalyzeConnection(connection); } var stats = new TcpStats(connections.Length, _sentTotal, _receivedTotal, _sentSinceLastRun, _receivedSinceLastRun, _pendingSendOnLastRun, _inSendOnLastRun, _pendingReceivedOnLastRun, measurePeriod); if (Application.IsDefined(Application.DumpStatistics)) { Log.Trace("\n# Total connections: {0,3}. Out: {1:0.00}b/s In: {2:0.00}b/s Pending Send: {3} " + "In Send: {4} Pending Received: {5} Measure Time: {6}", stats.Connections, stats.SendingSpeed, stats.ReceivingSpeed, stats.PendingSend, stats.InSend, stats.PendingSend, stats.MeasureTime); } return stats; }
private TcpStats AnalyzeConnections(ConnectionData[] connections, TimeSpan measurePeriod) { _receivedSinceLastRun = 0; _sentSinceLastRun = 0; _pendingSendOnLastRun = 0; _inSendOnLastRun = 0; _pendingReceivedOnLastRun = 0; _anySendBlockedOnLastRun = false; foreach (var connection in connections) { AnalyzeConnection(connection); } var stats = new TcpStats(connections.Length, _sentTotal, _receivedTotal, _sentSinceLastRun, _receivedSinceLastRun, _pendingSendOnLastRun, _inSendOnLastRun, _pendingReceivedOnLastRun, measurePeriod); #if DUMP_STATISTICS Log.Trace("\n# Total connections: {0,3}. Out: {1:0.00}b/s In: {2:0.00}b/s Pending Send: {3} " + "In Send: {4} Pending Received: {5} Measure Time: {6}", stats.Connections, stats.SendingSpeed, stats.ReceivingSpeed, stats.PendingSend, stats.InSend, stats.PendingSend, stats.MeasureTimeFriendly); #endif return(stats); }
private TcpStats AnalyzeConnections(ConnectionData[] connections, TimeSpan measurePeriod) { _receivedSinceLastRun = 0; _sentSinceLastRun = 0; _pendingSendOnLastRun = 0; _inSendOnLastRun = 0; _pendingReceivedOnLastRun = 0; _anySendBlockedOnLastRun = false; foreach (var connection in connections) { AnalyzeConnection(connection); } var stats = new TcpStats(connections.Length, _sentTotal, _receivedTotal, _sentSinceLastRun, _receivedSinceLastRun, _pendingSendOnLastRun, _inSendOnLastRun, _pendingReceivedOnLastRun, measurePeriod); Log.Trace("# Total connections: {0,3}. Out: {1:8} In: {2:8} Pending Send: {3} " + "In Send: {4} Pending Received: {5} Measure Time: {6}", stats.Connections, stats.SendingSpeed, stats.ReceivingSpeed, stats.PendingSend, stats.InSend, stats.PendingSend, stats.MeasureTimeFriendly); return stats; }